{-# 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.Pinpoint.DeleteRecommenderConfiguration
(
DeleteRecommenderConfiguration (..),
newDeleteRecommenderConfiguration,
deleteRecommenderConfiguration_recommenderId,
DeleteRecommenderConfigurationResponse (..),
newDeleteRecommenderConfigurationResponse,
deleteRecommenderConfigurationResponse_httpStatus,
deleteRecommenderConfigurationResponse_recommenderConfigurationResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteRecommenderConfiguration = DeleteRecommenderConfiguration'
{
DeleteRecommenderConfiguration -> Text
recommenderId :: Prelude.Text
}
deriving (DeleteRecommenderConfiguration
-> DeleteRecommenderConfiguration -> Bool
(DeleteRecommenderConfiguration
-> DeleteRecommenderConfiguration -> Bool)
-> (DeleteRecommenderConfiguration
-> DeleteRecommenderConfiguration -> Bool)
-> Eq DeleteRecommenderConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRecommenderConfiguration
-> DeleteRecommenderConfiguration -> Bool
$c/= :: DeleteRecommenderConfiguration
-> DeleteRecommenderConfiguration -> Bool
== :: DeleteRecommenderConfiguration
-> DeleteRecommenderConfiguration -> Bool
$c== :: DeleteRecommenderConfiguration
-> DeleteRecommenderConfiguration -> Bool
Prelude.Eq, ReadPrec [DeleteRecommenderConfiguration]
ReadPrec DeleteRecommenderConfiguration
Int -> ReadS DeleteRecommenderConfiguration
ReadS [DeleteRecommenderConfiguration]
(Int -> ReadS DeleteRecommenderConfiguration)
-> ReadS [DeleteRecommenderConfiguration]
-> ReadPrec DeleteRecommenderConfiguration
-> ReadPrec [DeleteRecommenderConfiguration]
-> Read DeleteRecommenderConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRecommenderConfiguration]
$creadListPrec :: ReadPrec [DeleteRecommenderConfiguration]
readPrec :: ReadPrec DeleteRecommenderConfiguration
$creadPrec :: ReadPrec DeleteRecommenderConfiguration
readList :: ReadS [DeleteRecommenderConfiguration]
$creadList :: ReadS [DeleteRecommenderConfiguration]
readsPrec :: Int -> ReadS DeleteRecommenderConfiguration
$creadsPrec :: Int -> ReadS DeleteRecommenderConfiguration
Prelude.Read, Int -> DeleteRecommenderConfiguration -> ShowS
[DeleteRecommenderConfiguration] -> ShowS
DeleteRecommenderConfiguration -> String
(Int -> DeleteRecommenderConfiguration -> ShowS)
-> (DeleteRecommenderConfiguration -> String)
-> ([DeleteRecommenderConfiguration] -> ShowS)
-> Show DeleteRecommenderConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRecommenderConfiguration] -> ShowS
$cshowList :: [DeleteRecommenderConfiguration] -> ShowS
show :: DeleteRecommenderConfiguration -> String
$cshow :: DeleteRecommenderConfiguration -> String
showsPrec :: Int -> DeleteRecommenderConfiguration -> ShowS
$cshowsPrec :: Int -> DeleteRecommenderConfiguration -> ShowS
Prelude.Show, (forall x.
DeleteRecommenderConfiguration
-> Rep DeleteRecommenderConfiguration x)
-> (forall x.
Rep DeleteRecommenderConfiguration x
-> DeleteRecommenderConfiguration)
-> Generic DeleteRecommenderConfiguration
forall x.
Rep DeleteRecommenderConfiguration x
-> DeleteRecommenderConfiguration
forall x.
DeleteRecommenderConfiguration
-> Rep DeleteRecommenderConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRecommenderConfiguration x
-> DeleteRecommenderConfiguration
$cfrom :: forall x.
DeleteRecommenderConfiguration
-> Rep DeleteRecommenderConfiguration x
Prelude.Generic)
newDeleteRecommenderConfiguration ::
Prelude.Text ->
DeleteRecommenderConfiguration
newDeleteRecommenderConfiguration :: Text -> DeleteRecommenderConfiguration
newDeleteRecommenderConfiguration Text
pRecommenderId_ =
DeleteRecommenderConfiguration' :: Text -> DeleteRecommenderConfiguration
DeleteRecommenderConfiguration'
{ $sel:recommenderId:DeleteRecommenderConfiguration' :: Text
recommenderId =
Text
pRecommenderId_
}
deleteRecommenderConfiguration_recommenderId :: Lens.Lens' DeleteRecommenderConfiguration Prelude.Text
deleteRecommenderConfiguration_recommenderId :: (Text -> f Text)
-> DeleteRecommenderConfiguration
-> f DeleteRecommenderConfiguration
deleteRecommenderConfiguration_recommenderId = (DeleteRecommenderConfiguration -> Text)
-> (DeleteRecommenderConfiguration
-> Text -> DeleteRecommenderConfiguration)
-> Lens
DeleteRecommenderConfiguration
DeleteRecommenderConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRecommenderConfiguration' {Text
recommenderId :: Text
$sel:recommenderId:DeleteRecommenderConfiguration' :: DeleteRecommenderConfiguration -> Text
recommenderId} -> Text
recommenderId) (\s :: DeleteRecommenderConfiguration
s@DeleteRecommenderConfiguration' {} Text
a -> DeleteRecommenderConfiguration
s {$sel:recommenderId:DeleteRecommenderConfiguration' :: Text
recommenderId = Text
a} :: DeleteRecommenderConfiguration)
instance
Core.AWSRequest
DeleteRecommenderConfiguration
where
type
AWSResponse DeleteRecommenderConfiguration =
DeleteRecommenderConfigurationResponse
request :: DeleteRecommenderConfiguration
-> Request DeleteRecommenderConfiguration
request = Service
-> DeleteRecommenderConfiguration
-> Request DeleteRecommenderConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteRecommenderConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteRecommenderConfiguration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteRecommenderConfiguration))
-> Logger
-> Service
-> Proxy DeleteRecommenderConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteRecommenderConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int
-> RecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse
DeleteRecommenderConfigurationResponse'
(Int
-> RecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse)
-> Either String Int
-> Either
String
(RecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse)
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))
Either
String
(RecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse)
-> Either String RecommenderConfigurationResponse
-> Either String DeleteRecommenderConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object -> Either String RecommenderConfigurationResponse
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
)
instance
Prelude.Hashable
DeleteRecommenderConfiguration
instance
Prelude.NFData
DeleteRecommenderConfiguration
instance
Core.ToHeaders
DeleteRecommenderConfiguration
where
toHeaders :: DeleteRecommenderConfiguration -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DeleteRecommenderConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath DeleteRecommenderConfiguration where
toPath :: DeleteRecommenderConfiguration -> ByteString
toPath DeleteRecommenderConfiguration' {Text
recommenderId :: Text
$sel:recommenderId:DeleteRecommenderConfiguration' :: DeleteRecommenderConfiguration -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/v1/recommenders/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
recommenderId]
instance Core.ToQuery DeleteRecommenderConfiguration where
toQuery :: DeleteRecommenderConfiguration -> QueryString
toQuery = QueryString -> DeleteRecommenderConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteRecommenderConfigurationResponse = DeleteRecommenderConfigurationResponse'
{
DeleteRecommenderConfigurationResponse -> Int
httpStatus :: Prelude.Int,
DeleteRecommenderConfigurationResponse
-> RecommenderConfigurationResponse
recommenderConfigurationResponse :: RecommenderConfigurationResponse
}
deriving (DeleteRecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse -> Bool
(DeleteRecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse -> Bool)
-> (DeleteRecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse -> Bool)
-> Eq DeleteRecommenderConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse -> Bool
$c/= :: DeleteRecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse -> Bool
== :: DeleteRecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse -> Bool
$c== :: DeleteRecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRecommenderConfigurationResponse]
ReadPrec DeleteRecommenderConfigurationResponse
Int -> ReadS DeleteRecommenderConfigurationResponse
ReadS [DeleteRecommenderConfigurationResponse]
(Int -> ReadS DeleteRecommenderConfigurationResponse)
-> ReadS [DeleteRecommenderConfigurationResponse]
-> ReadPrec DeleteRecommenderConfigurationResponse
-> ReadPrec [DeleteRecommenderConfigurationResponse]
-> Read DeleteRecommenderConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRecommenderConfigurationResponse]
$creadListPrec :: ReadPrec [DeleteRecommenderConfigurationResponse]
readPrec :: ReadPrec DeleteRecommenderConfigurationResponse
$creadPrec :: ReadPrec DeleteRecommenderConfigurationResponse
readList :: ReadS [DeleteRecommenderConfigurationResponse]
$creadList :: ReadS [DeleteRecommenderConfigurationResponse]
readsPrec :: Int -> ReadS DeleteRecommenderConfigurationResponse
$creadsPrec :: Int -> ReadS DeleteRecommenderConfigurationResponse
Prelude.Read, Int -> DeleteRecommenderConfigurationResponse -> ShowS
[DeleteRecommenderConfigurationResponse] -> ShowS
DeleteRecommenderConfigurationResponse -> String
(Int -> DeleteRecommenderConfigurationResponse -> ShowS)
-> (DeleteRecommenderConfigurationResponse -> String)
-> ([DeleteRecommenderConfigurationResponse] -> ShowS)
-> Show DeleteRecommenderConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRecommenderConfigurationResponse] -> ShowS
$cshowList :: [DeleteRecommenderConfigurationResponse] -> ShowS
show :: DeleteRecommenderConfigurationResponse -> String
$cshow :: DeleteRecommenderConfigurationResponse -> String
showsPrec :: Int -> DeleteRecommenderConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DeleteRecommenderConfigurationResponse -> ShowS
Prelude.Show, (forall x.
DeleteRecommenderConfigurationResponse
-> Rep DeleteRecommenderConfigurationResponse x)
-> (forall x.
Rep DeleteRecommenderConfigurationResponse x
-> DeleteRecommenderConfigurationResponse)
-> Generic DeleteRecommenderConfigurationResponse
forall x.
Rep DeleteRecommenderConfigurationResponse x
-> DeleteRecommenderConfigurationResponse
forall x.
DeleteRecommenderConfigurationResponse
-> Rep DeleteRecommenderConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRecommenderConfigurationResponse x
-> DeleteRecommenderConfigurationResponse
$cfrom :: forall x.
DeleteRecommenderConfigurationResponse
-> Rep DeleteRecommenderConfigurationResponse x
Prelude.Generic)
newDeleteRecommenderConfigurationResponse ::
Prelude.Int ->
RecommenderConfigurationResponse ->
DeleteRecommenderConfigurationResponse
newDeleteRecommenderConfigurationResponse :: Int
-> RecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse
newDeleteRecommenderConfigurationResponse
Int
pHttpStatus_
RecommenderConfigurationResponse
pRecommenderConfigurationResponse_ =
DeleteRecommenderConfigurationResponse' :: Int
-> RecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse
DeleteRecommenderConfigurationResponse'
{ $sel:httpStatus:DeleteRecommenderConfigurationResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:recommenderConfigurationResponse:DeleteRecommenderConfigurationResponse' :: RecommenderConfigurationResponse
recommenderConfigurationResponse =
RecommenderConfigurationResponse
pRecommenderConfigurationResponse_
}
deleteRecommenderConfigurationResponse_httpStatus :: Lens.Lens' DeleteRecommenderConfigurationResponse Prelude.Int
deleteRecommenderConfigurationResponse_httpStatus :: (Int -> f Int)
-> DeleteRecommenderConfigurationResponse
-> f DeleteRecommenderConfigurationResponse
deleteRecommenderConfigurationResponse_httpStatus = (DeleteRecommenderConfigurationResponse -> Int)
-> (DeleteRecommenderConfigurationResponse
-> Int -> DeleteRecommenderConfigurationResponse)
-> Lens
DeleteRecommenderConfigurationResponse
DeleteRecommenderConfigurationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRecommenderConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteRecommenderConfigurationResponse' :: DeleteRecommenderConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteRecommenderConfigurationResponse
s@DeleteRecommenderConfigurationResponse' {} Int
a -> DeleteRecommenderConfigurationResponse
s {$sel:httpStatus:DeleteRecommenderConfigurationResponse' :: Int
httpStatus = Int
a} :: DeleteRecommenderConfigurationResponse)
deleteRecommenderConfigurationResponse_recommenderConfigurationResponse :: Lens.Lens' DeleteRecommenderConfigurationResponse RecommenderConfigurationResponse
deleteRecommenderConfigurationResponse_recommenderConfigurationResponse :: (RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse)
-> DeleteRecommenderConfigurationResponse
-> f DeleteRecommenderConfigurationResponse
deleteRecommenderConfigurationResponse_recommenderConfigurationResponse = (DeleteRecommenderConfigurationResponse
-> RecommenderConfigurationResponse)
-> (DeleteRecommenderConfigurationResponse
-> RecommenderConfigurationResponse
-> DeleteRecommenderConfigurationResponse)
-> Lens
DeleteRecommenderConfigurationResponse
DeleteRecommenderConfigurationResponse
RecommenderConfigurationResponse
RecommenderConfigurationResponse
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRecommenderConfigurationResponse' {RecommenderConfigurationResponse
recommenderConfigurationResponse :: RecommenderConfigurationResponse
$sel:recommenderConfigurationResponse:DeleteRecommenderConfigurationResponse' :: DeleteRecommenderConfigurationResponse
-> RecommenderConfigurationResponse
recommenderConfigurationResponse} -> RecommenderConfigurationResponse
recommenderConfigurationResponse) (\s :: DeleteRecommenderConfigurationResponse
s@DeleteRecommenderConfigurationResponse' {} RecommenderConfigurationResponse
a -> DeleteRecommenderConfigurationResponse
s {$sel:recommenderConfigurationResponse:DeleteRecommenderConfigurationResponse' :: RecommenderConfigurationResponse
recommenderConfigurationResponse = RecommenderConfigurationResponse
a} :: DeleteRecommenderConfigurationResponse)
instance
Prelude.NFData
DeleteRecommenderConfigurationResponse