{-# 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.DeleteHoursOfOperation
(
DeleteHoursOfOperation (..),
newDeleteHoursOfOperation,
deleteHoursOfOperation_instanceId,
deleteHoursOfOperation_hoursOfOperationId,
DeleteHoursOfOperationResponse (..),
newDeleteHoursOfOperationResponse,
)
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 DeleteHoursOfOperation = DeleteHoursOfOperation'
{
DeleteHoursOfOperation -> Text
instanceId :: Prelude.Text,
DeleteHoursOfOperation -> Text
hoursOfOperationId :: Prelude.Text
}
deriving (DeleteHoursOfOperation -> DeleteHoursOfOperation -> Bool
(DeleteHoursOfOperation -> DeleteHoursOfOperation -> Bool)
-> (DeleteHoursOfOperation -> DeleteHoursOfOperation -> Bool)
-> Eq DeleteHoursOfOperation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteHoursOfOperation -> DeleteHoursOfOperation -> Bool
$c/= :: DeleteHoursOfOperation -> DeleteHoursOfOperation -> Bool
== :: DeleteHoursOfOperation -> DeleteHoursOfOperation -> Bool
$c== :: DeleteHoursOfOperation -> DeleteHoursOfOperation -> Bool
Prelude.Eq, ReadPrec [DeleteHoursOfOperation]
ReadPrec DeleteHoursOfOperation
Int -> ReadS DeleteHoursOfOperation
ReadS [DeleteHoursOfOperation]
(Int -> ReadS DeleteHoursOfOperation)
-> ReadS [DeleteHoursOfOperation]
-> ReadPrec DeleteHoursOfOperation
-> ReadPrec [DeleteHoursOfOperation]
-> Read DeleteHoursOfOperation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteHoursOfOperation]
$creadListPrec :: ReadPrec [DeleteHoursOfOperation]
readPrec :: ReadPrec DeleteHoursOfOperation
$creadPrec :: ReadPrec DeleteHoursOfOperation
readList :: ReadS [DeleteHoursOfOperation]
$creadList :: ReadS [DeleteHoursOfOperation]
readsPrec :: Int -> ReadS DeleteHoursOfOperation
$creadsPrec :: Int -> ReadS DeleteHoursOfOperation
Prelude.Read, Int -> DeleteHoursOfOperation -> ShowS
[DeleteHoursOfOperation] -> ShowS
DeleteHoursOfOperation -> String
(Int -> DeleteHoursOfOperation -> ShowS)
-> (DeleteHoursOfOperation -> String)
-> ([DeleteHoursOfOperation] -> ShowS)
-> Show DeleteHoursOfOperation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteHoursOfOperation] -> ShowS
$cshowList :: [DeleteHoursOfOperation] -> ShowS
show :: DeleteHoursOfOperation -> String
$cshow :: DeleteHoursOfOperation -> String
showsPrec :: Int -> DeleteHoursOfOperation -> ShowS
$cshowsPrec :: Int -> DeleteHoursOfOperation -> ShowS
Prelude.Show, (forall x. DeleteHoursOfOperation -> Rep DeleteHoursOfOperation x)
-> (forall x.
Rep DeleteHoursOfOperation x -> DeleteHoursOfOperation)
-> Generic DeleteHoursOfOperation
forall x. Rep DeleteHoursOfOperation x -> DeleteHoursOfOperation
forall x. DeleteHoursOfOperation -> Rep DeleteHoursOfOperation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteHoursOfOperation x -> DeleteHoursOfOperation
$cfrom :: forall x. DeleteHoursOfOperation -> Rep DeleteHoursOfOperation x
Prelude.Generic)
newDeleteHoursOfOperation ::
Prelude.Text ->
Prelude.Text ->
DeleteHoursOfOperation
newDeleteHoursOfOperation :: Text -> Text -> DeleteHoursOfOperation
newDeleteHoursOfOperation
Text
pInstanceId_
Text
pHoursOfOperationId_ =
DeleteHoursOfOperation' :: Text -> Text -> DeleteHoursOfOperation
DeleteHoursOfOperation'
{ $sel:instanceId:DeleteHoursOfOperation' :: Text
instanceId = Text
pInstanceId_,
$sel:hoursOfOperationId:DeleteHoursOfOperation' :: Text
hoursOfOperationId = Text
pHoursOfOperationId_
}
deleteHoursOfOperation_instanceId :: Lens.Lens' DeleteHoursOfOperation Prelude.Text
deleteHoursOfOperation_instanceId :: (Text -> f Text)
-> DeleteHoursOfOperation -> f DeleteHoursOfOperation
deleteHoursOfOperation_instanceId = (DeleteHoursOfOperation -> Text)
-> (DeleteHoursOfOperation -> Text -> DeleteHoursOfOperation)
-> Lens DeleteHoursOfOperation DeleteHoursOfOperation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteHoursOfOperation' {Text
instanceId :: Text
$sel:instanceId:DeleteHoursOfOperation' :: DeleteHoursOfOperation -> Text
instanceId} -> Text
instanceId) (\s :: DeleteHoursOfOperation
s@DeleteHoursOfOperation' {} Text
a -> DeleteHoursOfOperation
s {$sel:instanceId:DeleteHoursOfOperation' :: Text
instanceId = Text
a} :: DeleteHoursOfOperation)
deleteHoursOfOperation_hoursOfOperationId :: Lens.Lens' DeleteHoursOfOperation Prelude.Text
deleteHoursOfOperation_hoursOfOperationId :: (Text -> f Text)
-> DeleteHoursOfOperation -> f DeleteHoursOfOperation
deleteHoursOfOperation_hoursOfOperationId = (DeleteHoursOfOperation -> Text)
-> (DeleteHoursOfOperation -> Text -> DeleteHoursOfOperation)
-> Lens DeleteHoursOfOperation DeleteHoursOfOperation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteHoursOfOperation' {Text
hoursOfOperationId :: Text
$sel:hoursOfOperationId:DeleteHoursOfOperation' :: DeleteHoursOfOperation -> Text
hoursOfOperationId} -> Text
hoursOfOperationId) (\s :: DeleteHoursOfOperation
s@DeleteHoursOfOperation' {} Text
a -> DeleteHoursOfOperation
s {$sel:hoursOfOperationId:DeleteHoursOfOperation' :: Text
hoursOfOperationId = Text
a} :: DeleteHoursOfOperation)
instance Core.AWSRequest DeleteHoursOfOperation where
type
AWSResponse DeleteHoursOfOperation =
DeleteHoursOfOperationResponse
request :: DeleteHoursOfOperation -> Request DeleteHoursOfOperation
request = Service -> DeleteHoursOfOperation -> Request DeleteHoursOfOperation
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteHoursOfOperation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteHoursOfOperation)))
response =
AWSResponse DeleteHoursOfOperation
-> Logger
-> Service
-> Proxy DeleteHoursOfOperation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteHoursOfOperation)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteHoursOfOperation
DeleteHoursOfOperationResponse
DeleteHoursOfOperationResponse'
instance Prelude.Hashable DeleteHoursOfOperation
instance Prelude.NFData DeleteHoursOfOperation
instance Core.ToHeaders DeleteHoursOfOperation where
toHeaders :: DeleteHoursOfOperation -> [Header]
toHeaders =
[Header] -> DeleteHoursOfOperation -> [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 DeleteHoursOfOperation where
toPath :: DeleteHoursOfOperation -> ByteString
toPath DeleteHoursOfOperation' {Text
hoursOfOperationId :: Text
instanceId :: Text
$sel:hoursOfOperationId:DeleteHoursOfOperation' :: DeleteHoursOfOperation -> Text
$sel:instanceId:DeleteHoursOfOperation' :: DeleteHoursOfOperation -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/hours-of-operations/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
ByteString
"/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
hoursOfOperationId
]
instance Core.ToQuery DeleteHoursOfOperation where
toQuery :: DeleteHoursOfOperation -> QueryString
toQuery = QueryString -> DeleteHoursOfOperation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteHoursOfOperationResponse = DeleteHoursOfOperationResponse'
{
}
deriving (DeleteHoursOfOperationResponse
-> DeleteHoursOfOperationResponse -> Bool
(DeleteHoursOfOperationResponse
-> DeleteHoursOfOperationResponse -> Bool)
-> (DeleteHoursOfOperationResponse
-> DeleteHoursOfOperationResponse -> Bool)
-> Eq DeleteHoursOfOperationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteHoursOfOperationResponse
-> DeleteHoursOfOperationResponse -> Bool
$c/= :: DeleteHoursOfOperationResponse
-> DeleteHoursOfOperationResponse -> Bool
== :: DeleteHoursOfOperationResponse
-> DeleteHoursOfOperationResponse -> Bool
$c== :: DeleteHoursOfOperationResponse
-> DeleteHoursOfOperationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteHoursOfOperationResponse]
ReadPrec DeleteHoursOfOperationResponse
Int -> ReadS DeleteHoursOfOperationResponse
ReadS [DeleteHoursOfOperationResponse]
(Int -> ReadS DeleteHoursOfOperationResponse)
-> ReadS [DeleteHoursOfOperationResponse]
-> ReadPrec DeleteHoursOfOperationResponse
-> ReadPrec [DeleteHoursOfOperationResponse]
-> Read DeleteHoursOfOperationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteHoursOfOperationResponse]
$creadListPrec :: ReadPrec [DeleteHoursOfOperationResponse]
readPrec :: ReadPrec DeleteHoursOfOperationResponse
$creadPrec :: ReadPrec DeleteHoursOfOperationResponse
readList :: ReadS [DeleteHoursOfOperationResponse]
$creadList :: ReadS [DeleteHoursOfOperationResponse]
readsPrec :: Int -> ReadS DeleteHoursOfOperationResponse
$creadsPrec :: Int -> ReadS DeleteHoursOfOperationResponse
Prelude.Read, Int -> DeleteHoursOfOperationResponse -> ShowS
[DeleteHoursOfOperationResponse] -> ShowS
DeleteHoursOfOperationResponse -> String
(Int -> DeleteHoursOfOperationResponse -> ShowS)
-> (DeleteHoursOfOperationResponse -> String)
-> ([DeleteHoursOfOperationResponse] -> ShowS)
-> Show DeleteHoursOfOperationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteHoursOfOperationResponse] -> ShowS
$cshowList :: [DeleteHoursOfOperationResponse] -> ShowS
show :: DeleteHoursOfOperationResponse -> String
$cshow :: DeleteHoursOfOperationResponse -> String
showsPrec :: Int -> DeleteHoursOfOperationResponse -> ShowS
$cshowsPrec :: Int -> DeleteHoursOfOperationResponse -> ShowS
Prelude.Show, (forall x.
DeleteHoursOfOperationResponse
-> Rep DeleteHoursOfOperationResponse x)
-> (forall x.
Rep DeleteHoursOfOperationResponse x
-> DeleteHoursOfOperationResponse)
-> Generic DeleteHoursOfOperationResponse
forall x.
Rep DeleteHoursOfOperationResponse x
-> DeleteHoursOfOperationResponse
forall x.
DeleteHoursOfOperationResponse
-> Rep DeleteHoursOfOperationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteHoursOfOperationResponse x
-> DeleteHoursOfOperationResponse
$cfrom :: forall x.
DeleteHoursOfOperationResponse
-> Rep DeleteHoursOfOperationResponse x
Prelude.Generic)
newDeleteHoursOfOperationResponse ::
DeleteHoursOfOperationResponse
newDeleteHoursOfOperationResponse :: DeleteHoursOfOperationResponse
newDeleteHoursOfOperationResponse =
DeleteHoursOfOperationResponse
DeleteHoursOfOperationResponse'
instance
Prelude.NFData
DeleteHoursOfOperationResponse