{-# 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.Personalize.DeleteEventTracker
(
DeleteEventTracker (..),
newDeleteEventTracker,
deleteEventTracker_eventTrackerArn,
DeleteEventTrackerResponse (..),
newDeleteEventTrackerResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Personalize.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteEventTracker = DeleteEventTracker'
{
DeleteEventTracker -> Text
eventTrackerArn :: Prelude.Text
}
deriving (DeleteEventTracker -> DeleteEventTracker -> Bool
(DeleteEventTracker -> DeleteEventTracker -> Bool)
-> (DeleteEventTracker -> DeleteEventTracker -> Bool)
-> Eq DeleteEventTracker
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEventTracker -> DeleteEventTracker -> Bool
$c/= :: DeleteEventTracker -> DeleteEventTracker -> Bool
== :: DeleteEventTracker -> DeleteEventTracker -> Bool
$c== :: DeleteEventTracker -> DeleteEventTracker -> Bool
Prelude.Eq, ReadPrec [DeleteEventTracker]
ReadPrec DeleteEventTracker
Int -> ReadS DeleteEventTracker
ReadS [DeleteEventTracker]
(Int -> ReadS DeleteEventTracker)
-> ReadS [DeleteEventTracker]
-> ReadPrec DeleteEventTracker
-> ReadPrec [DeleteEventTracker]
-> Read DeleteEventTracker
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEventTracker]
$creadListPrec :: ReadPrec [DeleteEventTracker]
readPrec :: ReadPrec DeleteEventTracker
$creadPrec :: ReadPrec DeleteEventTracker
readList :: ReadS [DeleteEventTracker]
$creadList :: ReadS [DeleteEventTracker]
readsPrec :: Int -> ReadS DeleteEventTracker
$creadsPrec :: Int -> ReadS DeleteEventTracker
Prelude.Read, Int -> DeleteEventTracker -> ShowS
[DeleteEventTracker] -> ShowS
DeleteEventTracker -> String
(Int -> DeleteEventTracker -> ShowS)
-> (DeleteEventTracker -> String)
-> ([DeleteEventTracker] -> ShowS)
-> Show DeleteEventTracker
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEventTracker] -> ShowS
$cshowList :: [DeleteEventTracker] -> ShowS
show :: DeleteEventTracker -> String
$cshow :: DeleteEventTracker -> String
showsPrec :: Int -> DeleteEventTracker -> ShowS
$cshowsPrec :: Int -> DeleteEventTracker -> ShowS
Prelude.Show, (forall x. DeleteEventTracker -> Rep DeleteEventTracker x)
-> (forall x. Rep DeleteEventTracker x -> DeleteEventTracker)
-> Generic DeleteEventTracker
forall x. Rep DeleteEventTracker x -> DeleteEventTracker
forall x. DeleteEventTracker -> Rep DeleteEventTracker x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteEventTracker x -> DeleteEventTracker
$cfrom :: forall x. DeleteEventTracker -> Rep DeleteEventTracker x
Prelude.Generic)
newDeleteEventTracker ::
Prelude.Text ->
DeleteEventTracker
newDeleteEventTracker :: Text -> DeleteEventTracker
newDeleteEventTracker Text
pEventTrackerArn_ =
DeleteEventTracker' :: Text -> DeleteEventTracker
DeleteEventTracker'
{ $sel:eventTrackerArn:DeleteEventTracker' :: Text
eventTrackerArn =
Text
pEventTrackerArn_
}
deleteEventTracker_eventTrackerArn :: Lens.Lens' DeleteEventTracker Prelude.Text
deleteEventTracker_eventTrackerArn :: (Text -> f Text) -> DeleteEventTracker -> f DeleteEventTracker
deleteEventTracker_eventTrackerArn = (DeleteEventTracker -> Text)
-> (DeleteEventTracker -> Text -> DeleteEventTracker)
-> Lens DeleteEventTracker DeleteEventTracker Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEventTracker' {Text
eventTrackerArn :: Text
$sel:eventTrackerArn:DeleteEventTracker' :: DeleteEventTracker -> Text
eventTrackerArn} -> Text
eventTrackerArn) (\s :: DeleteEventTracker
s@DeleteEventTracker' {} Text
a -> DeleteEventTracker
s {$sel:eventTrackerArn:DeleteEventTracker' :: Text
eventTrackerArn = Text
a} :: DeleteEventTracker)
instance Core.AWSRequest DeleteEventTracker where
type
AWSResponse DeleteEventTracker =
DeleteEventTrackerResponse
request :: DeleteEventTracker -> Request DeleteEventTracker
request = Service -> DeleteEventTracker -> Request DeleteEventTracker
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteEventTracker
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteEventTracker)))
response =
AWSResponse DeleteEventTracker
-> Logger
-> Service
-> Proxy DeleteEventTracker
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteEventTracker)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteEventTracker
DeleteEventTrackerResponse
DeleteEventTrackerResponse'
instance Prelude.Hashable DeleteEventTracker
instance Prelude.NFData DeleteEventTracker
instance Core.ToHeaders DeleteEventTracker where
toHeaders :: DeleteEventTracker -> [Header]
toHeaders =
[Header] -> DeleteEventTracker -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"AmazonPersonalize.DeleteEventTracker" ::
Prelude.ByteString
),
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 DeleteEventTracker where
toJSON :: DeleteEventTracker -> Value
toJSON DeleteEventTracker' {Text
eventTrackerArn :: Text
$sel:eventTrackerArn:DeleteEventTracker' :: DeleteEventTracker -> 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
"eventTrackerArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
eventTrackerArn)
]
)
instance Core.ToPath DeleteEventTracker where
toPath :: DeleteEventTracker -> ByteString
toPath = ByteString -> DeleteEventTracker -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteEventTracker where
toQuery :: DeleteEventTracker -> QueryString
toQuery = QueryString -> DeleteEventTracker -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteEventTrackerResponse = DeleteEventTrackerResponse'
{
}
deriving (DeleteEventTrackerResponse -> DeleteEventTrackerResponse -> Bool
(DeleteEventTrackerResponse -> DeleteEventTrackerResponse -> Bool)
-> (DeleteEventTrackerResponse
-> DeleteEventTrackerResponse -> Bool)
-> Eq DeleteEventTrackerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEventTrackerResponse -> DeleteEventTrackerResponse -> Bool
$c/= :: DeleteEventTrackerResponse -> DeleteEventTrackerResponse -> Bool
== :: DeleteEventTrackerResponse -> DeleteEventTrackerResponse -> Bool
$c== :: DeleteEventTrackerResponse -> DeleteEventTrackerResponse -> Bool
Prelude.Eq, ReadPrec [DeleteEventTrackerResponse]
ReadPrec DeleteEventTrackerResponse
Int -> ReadS DeleteEventTrackerResponse
ReadS [DeleteEventTrackerResponse]
(Int -> ReadS DeleteEventTrackerResponse)
-> ReadS [DeleteEventTrackerResponse]
-> ReadPrec DeleteEventTrackerResponse
-> ReadPrec [DeleteEventTrackerResponse]
-> Read DeleteEventTrackerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEventTrackerResponse]
$creadListPrec :: ReadPrec [DeleteEventTrackerResponse]
readPrec :: ReadPrec DeleteEventTrackerResponse
$creadPrec :: ReadPrec DeleteEventTrackerResponse
readList :: ReadS [DeleteEventTrackerResponse]
$creadList :: ReadS [DeleteEventTrackerResponse]
readsPrec :: Int -> ReadS DeleteEventTrackerResponse
$creadsPrec :: Int -> ReadS DeleteEventTrackerResponse
Prelude.Read, Int -> DeleteEventTrackerResponse -> ShowS
[DeleteEventTrackerResponse] -> ShowS
DeleteEventTrackerResponse -> String
(Int -> DeleteEventTrackerResponse -> ShowS)
-> (DeleteEventTrackerResponse -> String)
-> ([DeleteEventTrackerResponse] -> ShowS)
-> Show DeleteEventTrackerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEventTrackerResponse] -> ShowS
$cshowList :: [DeleteEventTrackerResponse] -> ShowS
show :: DeleteEventTrackerResponse -> String
$cshow :: DeleteEventTrackerResponse -> String
showsPrec :: Int -> DeleteEventTrackerResponse -> ShowS
$cshowsPrec :: Int -> DeleteEventTrackerResponse -> ShowS
Prelude.Show, (forall x.
DeleteEventTrackerResponse -> Rep DeleteEventTrackerResponse x)
-> (forall x.
Rep DeleteEventTrackerResponse x -> DeleteEventTrackerResponse)
-> Generic DeleteEventTrackerResponse
forall x.
Rep DeleteEventTrackerResponse x -> DeleteEventTrackerResponse
forall x.
DeleteEventTrackerResponse -> Rep DeleteEventTrackerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteEventTrackerResponse x -> DeleteEventTrackerResponse
$cfrom :: forall x.
DeleteEventTrackerResponse -> Rep DeleteEventTrackerResponse x
Prelude.Generic)
newDeleteEventTrackerResponse ::
DeleteEventTrackerResponse
newDeleteEventTrackerResponse :: DeleteEventTrackerResponse
newDeleteEventTrackerResponse =
DeleteEventTrackerResponse
DeleteEventTrackerResponse'
instance Prelude.NFData DeleteEventTrackerResponse