{-# 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.AlexaBusiness.DeleteBusinessReportSchedule
(
DeleteBusinessReportSchedule (..),
newDeleteBusinessReportSchedule,
deleteBusinessReportSchedule_scheduleArn,
DeleteBusinessReportScheduleResponse (..),
newDeleteBusinessReportScheduleResponse,
deleteBusinessReportScheduleResponse_httpStatus,
)
where
import Amazonka.AlexaBusiness.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 DeleteBusinessReportSchedule = DeleteBusinessReportSchedule'
{
DeleteBusinessReportSchedule -> Text
scheduleArn :: Prelude.Text
}
deriving (DeleteBusinessReportSchedule
-> DeleteBusinessReportSchedule -> Bool
(DeleteBusinessReportSchedule
-> DeleteBusinessReportSchedule -> Bool)
-> (DeleteBusinessReportSchedule
-> DeleteBusinessReportSchedule -> Bool)
-> Eq DeleteBusinessReportSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBusinessReportSchedule
-> DeleteBusinessReportSchedule -> Bool
$c/= :: DeleteBusinessReportSchedule
-> DeleteBusinessReportSchedule -> Bool
== :: DeleteBusinessReportSchedule
-> DeleteBusinessReportSchedule -> Bool
$c== :: DeleteBusinessReportSchedule
-> DeleteBusinessReportSchedule -> Bool
Prelude.Eq, ReadPrec [DeleteBusinessReportSchedule]
ReadPrec DeleteBusinessReportSchedule
Int -> ReadS DeleteBusinessReportSchedule
ReadS [DeleteBusinessReportSchedule]
(Int -> ReadS DeleteBusinessReportSchedule)
-> ReadS [DeleteBusinessReportSchedule]
-> ReadPrec DeleteBusinessReportSchedule
-> ReadPrec [DeleteBusinessReportSchedule]
-> Read DeleteBusinessReportSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBusinessReportSchedule]
$creadListPrec :: ReadPrec [DeleteBusinessReportSchedule]
readPrec :: ReadPrec DeleteBusinessReportSchedule
$creadPrec :: ReadPrec DeleteBusinessReportSchedule
readList :: ReadS [DeleteBusinessReportSchedule]
$creadList :: ReadS [DeleteBusinessReportSchedule]
readsPrec :: Int -> ReadS DeleteBusinessReportSchedule
$creadsPrec :: Int -> ReadS DeleteBusinessReportSchedule
Prelude.Read, Int -> DeleteBusinessReportSchedule -> ShowS
[DeleteBusinessReportSchedule] -> ShowS
DeleteBusinessReportSchedule -> String
(Int -> DeleteBusinessReportSchedule -> ShowS)
-> (DeleteBusinessReportSchedule -> String)
-> ([DeleteBusinessReportSchedule] -> ShowS)
-> Show DeleteBusinessReportSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBusinessReportSchedule] -> ShowS
$cshowList :: [DeleteBusinessReportSchedule] -> ShowS
show :: DeleteBusinessReportSchedule -> String
$cshow :: DeleteBusinessReportSchedule -> String
showsPrec :: Int -> DeleteBusinessReportSchedule -> ShowS
$cshowsPrec :: Int -> DeleteBusinessReportSchedule -> ShowS
Prelude.Show, (forall x.
DeleteBusinessReportSchedule -> Rep DeleteBusinessReportSchedule x)
-> (forall x.
Rep DeleteBusinessReportSchedule x -> DeleteBusinessReportSchedule)
-> Generic DeleteBusinessReportSchedule
forall x.
Rep DeleteBusinessReportSchedule x -> DeleteBusinessReportSchedule
forall x.
DeleteBusinessReportSchedule -> Rep DeleteBusinessReportSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteBusinessReportSchedule x -> DeleteBusinessReportSchedule
$cfrom :: forall x.
DeleteBusinessReportSchedule -> Rep DeleteBusinessReportSchedule x
Prelude.Generic)
newDeleteBusinessReportSchedule ::
Prelude.Text ->
DeleteBusinessReportSchedule
newDeleteBusinessReportSchedule :: Text -> DeleteBusinessReportSchedule
newDeleteBusinessReportSchedule Text
pScheduleArn_ =
DeleteBusinessReportSchedule' :: Text -> DeleteBusinessReportSchedule
DeleteBusinessReportSchedule'
{ $sel:scheduleArn:DeleteBusinessReportSchedule' :: Text
scheduleArn =
Text
pScheduleArn_
}
deleteBusinessReportSchedule_scheduleArn :: Lens.Lens' DeleteBusinessReportSchedule Prelude.Text
deleteBusinessReportSchedule_scheduleArn :: (Text -> f Text)
-> DeleteBusinessReportSchedule -> f DeleteBusinessReportSchedule
deleteBusinessReportSchedule_scheduleArn = (DeleteBusinessReportSchedule -> Text)
-> (DeleteBusinessReportSchedule
-> Text -> DeleteBusinessReportSchedule)
-> Lens
DeleteBusinessReportSchedule DeleteBusinessReportSchedule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBusinessReportSchedule' {Text
scheduleArn :: Text
$sel:scheduleArn:DeleteBusinessReportSchedule' :: DeleteBusinessReportSchedule -> Text
scheduleArn} -> Text
scheduleArn) (\s :: DeleteBusinessReportSchedule
s@DeleteBusinessReportSchedule' {} Text
a -> DeleteBusinessReportSchedule
s {$sel:scheduleArn:DeleteBusinessReportSchedule' :: Text
scheduleArn = Text
a} :: DeleteBusinessReportSchedule)
instance Core.AWSRequest DeleteBusinessReportSchedule where
type
AWSResponse DeleteBusinessReportSchedule =
DeleteBusinessReportScheduleResponse
request :: DeleteBusinessReportSchedule
-> Request DeleteBusinessReportSchedule
request = Service
-> DeleteBusinessReportSchedule
-> Request DeleteBusinessReportSchedule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteBusinessReportSchedule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteBusinessReportSchedule)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteBusinessReportSchedule))
-> Logger
-> Service
-> Proxy DeleteBusinessReportSchedule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteBusinessReportSchedule)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteBusinessReportScheduleResponse
DeleteBusinessReportScheduleResponse'
(Int -> DeleteBusinessReportScheduleResponse)
-> Either String Int
-> Either String DeleteBusinessReportScheduleResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DeleteBusinessReportSchedule
instance Prelude.NFData DeleteBusinessReportSchedule
instance Core.ToHeaders DeleteBusinessReportSchedule where
toHeaders :: DeleteBusinessReportSchedule -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteBusinessReportSchedule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AlexaForBusiness.DeleteBusinessReportSchedule" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteBusinessReportSchedule where
toJSON :: DeleteBusinessReportSchedule -> Value
toJSON DeleteBusinessReportSchedule' {Text
scheduleArn :: Text
$sel:scheduleArn:DeleteBusinessReportSchedule' :: DeleteBusinessReportSchedule -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ScheduleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
scheduleArn)]
)
instance Core.ToPath DeleteBusinessReportSchedule where
toPath :: DeleteBusinessReportSchedule -> ByteString
toPath = ByteString -> DeleteBusinessReportSchedule -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteBusinessReportSchedule where
toQuery :: DeleteBusinessReportSchedule -> QueryString
toQuery = QueryString -> DeleteBusinessReportSchedule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteBusinessReportScheduleResponse = DeleteBusinessReportScheduleResponse'
{
DeleteBusinessReportScheduleResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteBusinessReportScheduleResponse
-> DeleteBusinessReportScheduleResponse -> Bool
(DeleteBusinessReportScheduleResponse
-> DeleteBusinessReportScheduleResponse -> Bool)
-> (DeleteBusinessReportScheduleResponse
-> DeleteBusinessReportScheduleResponse -> Bool)
-> Eq DeleteBusinessReportScheduleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBusinessReportScheduleResponse
-> DeleteBusinessReportScheduleResponse -> Bool
$c/= :: DeleteBusinessReportScheduleResponse
-> DeleteBusinessReportScheduleResponse -> Bool
== :: DeleteBusinessReportScheduleResponse
-> DeleteBusinessReportScheduleResponse -> Bool
$c== :: DeleteBusinessReportScheduleResponse
-> DeleteBusinessReportScheduleResponse -> Bool
Prelude.Eq, ReadPrec [DeleteBusinessReportScheduleResponse]
ReadPrec DeleteBusinessReportScheduleResponse
Int -> ReadS DeleteBusinessReportScheduleResponse
ReadS [DeleteBusinessReportScheduleResponse]
(Int -> ReadS DeleteBusinessReportScheduleResponse)
-> ReadS [DeleteBusinessReportScheduleResponse]
-> ReadPrec DeleteBusinessReportScheduleResponse
-> ReadPrec [DeleteBusinessReportScheduleResponse]
-> Read DeleteBusinessReportScheduleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBusinessReportScheduleResponse]
$creadListPrec :: ReadPrec [DeleteBusinessReportScheduleResponse]
readPrec :: ReadPrec DeleteBusinessReportScheduleResponse
$creadPrec :: ReadPrec DeleteBusinessReportScheduleResponse
readList :: ReadS [DeleteBusinessReportScheduleResponse]
$creadList :: ReadS [DeleteBusinessReportScheduleResponse]
readsPrec :: Int -> ReadS DeleteBusinessReportScheduleResponse
$creadsPrec :: Int -> ReadS DeleteBusinessReportScheduleResponse
Prelude.Read, Int -> DeleteBusinessReportScheduleResponse -> ShowS
[DeleteBusinessReportScheduleResponse] -> ShowS
DeleteBusinessReportScheduleResponse -> String
(Int -> DeleteBusinessReportScheduleResponse -> ShowS)
-> (DeleteBusinessReportScheduleResponse -> String)
-> ([DeleteBusinessReportScheduleResponse] -> ShowS)
-> Show DeleteBusinessReportScheduleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBusinessReportScheduleResponse] -> ShowS
$cshowList :: [DeleteBusinessReportScheduleResponse] -> ShowS
show :: DeleteBusinessReportScheduleResponse -> String
$cshow :: DeleteBusinessReportScheduleResponse -> String
showsPrec :: Int -> DeleteBusinessReportScheduleResponse -> ShowS
$cshowsPrec :: Int -> DeleteBusinessReportScheduleResponse -> ShowS
Prelude.Show, (forall x.
DeleteBusinessReportScheduleResponse
-> Rep DeleteBusinessReportScheduleResponse x)
-> (forall x.
Rep DeleteBusinessReportScheduleResponse x
-> DeleteBusinessReportScheduleResponse)
-> Generic DeleteBusinessReportScheduleResponse
forall x.
Rep DeleteBusinessReportScheduleResponse x
-> DeleteBusinessReportScheduleResponse
forall x.
DeleteBusinessReportScheduleResponse
-> Rep DeleteBusinessReportScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteBusinessReportScheduleResponse x
-> DeleteBusinessReportScheduleResponse
$cfrom :: forall x.
DeleteBusinessReportScheduleResponse
-> Rep DeleteBusinessReportScheduleResponse x
Prelude.Generic)
newDeleteBusinessReportScheduleResponse ::
Prelude.Int ->
DeleteBusinessReportScheduleResponse
newDeleteBusinessReportScheduleResponse :: Int -> DeleteBusinessReportScheduleResponse
newDeleteBusinessReportScheduleResponse Int
pHttpStatus_ =
DeleteBusinessReportScheduleResponse' :: Int -> DeleteBusinessReportScheduleResponse
DeleteBusinessReportScheduleResponse'
{ $sel:httpStatus:DeleteBusinessReportScheduleResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteBusinessReportScheduleResponse_httpStatus :: Lens.Lens' DeleteBusinessReportScheduleResponse Prelude.Int
deleteBusinessReportScheduleResponse_httpStatus :: (Int -> f Int)
-> DeleteBusinessReportScheduleResponse
-> f DeleteBusinessReportScheduleResponse
deleteBusinessReportScheduleResponse_httpStatus = (DeleteBusinessReportScheduleResponse -> Int)
-> (DeleteBusinessReportScheduleResponse
-> Int -> DeleteBusinessReportScheduleResponse)
-> Lens
DeleteBusinessReportScheduleResponse
DeleteBusinessReportScheduleResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBusinessReportScheduleResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteBusinessReportScheduleResponse' :: DeleteBusinessReportScheduleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteBusinessReportScheduleResponse
s@DeleteBusinessReportScheduleResponse' {} Int
a -> DeleteBusinessReportScheduleResponse
s {$sel:httpStatus:DeleteBusinessReportScheduleResponse' :: Int
httpStatus = Int
a} :: DeleteBusinessReportScheduleResponse)
instance
Prelude.NFData
DeleteBusinessReportScheduleResponse