{-# 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.DeleteMetricAttribution
(
DeleteMetricAttribution (..),
newDeleteMetricAttribution,
deleteMetricAttribution_metricAttributionArn,
DeleteMetricAttributionResponse (..),
newDeleteMetricAttributionResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Personalize.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteMetricAttribution = DeleteMetricAttribution'
{
DeleteMetricAttribution -> Text
metricAttributionArn :: Prelude.Text
}
deriving (DeleteMetricAttribution -> DeleteMetricAttribution -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMetricAttribution -> DeleteMetricAttribution -> Bool
$c/= :: DeleteMetricAttribution -> DeleteMetricAttribution -> Bool
== :: DeleteMetricAttribution -> DeleteMetricAttribution -> Bool
$c== :: DeleteMetricAttribution -> DeleteMetricAttribution -> Bool
Prelude.Eq, ReadPrec [DeleteMetricAttribution]
ReadPrec DeleteMetricAttribution
Int -> ReadS DeleteMetricAttribution
ReadS [DeleteMetricAttribution]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMetricAttribution]
$creadListPrec :: ReadPrec [DeleteMetricAttribution]
readPrec :: ReadPrec DeleteMetricAttribution
$creadPrec :: ReadPrec DeleteMetricAttribution
readList :: ReadS [DeleteMetricAttribution]
$creadList :: ReadS [DeleteMetricAttribution]
readsPrec :: Int -> ReadS DeleteMetricAttribution
$creadsPrec :: Int -> ReadS DeleteMetricAttribution
Prelude.Read, Int -> DeleteMetricAttribution -> ShowS
[DeleteMetricAttribution] -> ShowS
DeleteMetricAttribution -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMetricAttribution] -> ShowS
$cshowList :: [DeleteMetricAttribution] -> ShowS
show :: DeleteMetricAttribution -> String
$cshow :: DeleteMetricAttribution -> String
showsPrec :: Int -> DeleteMetricAttribution -> ShowS
$cshowsPrec :: Int -> DeleteMetricAttribution -> ShowS
Prelude.Show, forall x. Rep DeleteMetricAttribution x -> DeleteMetricAttribution
forall x. DeleteMetricAttribution -> Rep DeleteMetricAttribution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteMetricAttribution x -> DeleteMetricAttribution
$cfrom :: forall x. DeleteMetricAttribution -> Rep DeleteMetricAttribution x
Prelude.Generic)
newDeleteMetricAttribution ::
Prelude.Text ->
DeleteMetricAttribution
newDeleteMetricAttribution :: Text -> DeleteMetricAttribution
newDeleteMetricAttribution Text
pMetricAttributionArn_ =
DeleteMetricAttribution'
{ $sel:metricAttributionArn:DeleteMetricAttribution' :: Text
metricAttributionArn =
Text
pMetricAttributionArn_
}
deleteMetricAttribution_metricAttributionArn :: Lens.Lens' DeleteMetricAttribution Prelude.Text
deleteMetricAttribution_metricAttributionArn :: Lens' DeleteMetricAttribution Text
deleteMetricAttribution_metricAttributionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMetricAttribution' {Text
metricAttributionArn :: Text
$sel:metricAttributionArn:DeleteMetricAttribution' :: DeleteMetricAttribution -> Text
metricAttributionArn} -> Text
metricAttributionArn) (\s :: DeleteMetricAttribution
s@DeleteMetricAttribution' {} Text
a -> DeleteMetricAttribution
s {$sel:metricAttributionArn:DeleteMetricAttribution' :: Text
metricAttributionArn = Text
a} :: DeleteMetricAttribution)
instance Core.AWSRequest DeleteMetricAttribution where
type
AWSResponse DeleteMetricAttribution =
DeleteMetricAttributionResponse
request :: (Service -> Service)
-> DeleteMetricAttribution -> Request DeleteMetricAttribution
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 DeleteMetricAttribution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteMetricAttribution)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
DeleteMetricAttributionResponse
DeleteMetricAttributionResponse'
instance Prelude.Hashable DeleteMetricAttribution where
hashWithSalt :: Int -> DeleteMetricAttribution -> Int
hashWithSalt Int
_salt DeleteMetricAttribution' {Text
metricAttributionArn :: Text
$sel:metricAttributionArn:DeleteMetricAttribution' :: DeleteMetricAttribution -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
metricAttributionArn
instance Prelude.NFData DeleteMetricAttribution where
rnf :: DeleteMetricAttribution -> ()
rnf DeleteMetricAttribution' {Text
metricAttributionArn :: Text
$sel:metricAttributionArn:DeleteMetricAttribution' :: DeleteMetricAttribution -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
metricAttributionArn
instance Data.ToHeaders DeleteMetricAttribution where
toHeaders :: DeleteMetricAttribution -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"AmazonPersonalize.DeleteMetricAttribution" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteMetricAttribution where
toJSON :: DeleteMetricAttribution -> Value
toJSON DeleteMetricAttribution' {Text
metricAttributionArn :: Text
$sel:metricAttributionArn:DeleteMetricAttribution' :: DeleteMetricAttribution -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"metricAttributionArn"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
metricAttributionArn
)
]
)
instance Data.ToPath DeleteMetricAttribution where
toPath :: DeleteMetricAttribution -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteMetricAttribution where
toQuery :: DeleteMetricAttribution -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteMetricAttributionResponse = DeleteMetricAttributionResponse'
{
}
deriving (DeleteMetricAttributionResponse
-> DeleteMetricAttributionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMetricAttributionResponse
-> DeleteMetricAttributionResponse -> Bool
$c/= :: DeleteMetricAttributionResponse
-> DeleteMetricAttributionResponse -> Bool
== :: DeleteMetricAttributionResponse
-> DeleteMetricAttributionResponse -> Bool
$c== :: DeleteMetricAttributionResponse
-> DeleteMetricAttributionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteMetricAttributionResponse]
ReadPrec DeleteMetricAttributionResponse
Int -> ReadS DeleteMetricAttributionResponse
ReadS [DeleteMetricAttributionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMetricAttributionResponse]
$creadListPrec :: ReadPrec [DeleteMetricAttributionResponse]
readPrec :: ReadPrec DeleteMetricAttributionResponse
$creadPrec :: ReadPrec DeleteMetricAttributionResponse
readList :: ReadS [DeleteMetricAttributionResponse]
$creadList :: ReadS [DeleteMetricAttributionResponse]
readsPrec :: Int -> ReadS DeleteMetricAttributionResponse
$creadsPrec :: Int -> ReadS DeleteMetricAttributionResponse
Prelude.Read, Int -> DeleteMetricAttributionResponse -> ShowS
[DeleteMetricAttributionResponse] -> ShowS
DeleteMetricAttributionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMetricAttributionResponse] -> ShowS
$cshowList :: [DeleteMetricAttributionResponse] -> ShowS
show :: DeleteMetricAttributionResponse -> String
$cshow :: DeleteMetricAttributionResponse -> String
showsPrec :: Int -> DeleteMetricAttributionResponse -> ShowS
$cshowsPrec :: Int -> DeleteMetricAttributionResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteMetricAttributionResponse x
-> DeleteMetricAttributionResponse
forall x.
DeleteMetricAttributionResponse
-> Rep DeleteMetricAttributionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteMetricAttributionResponse x
-> DeleteMetricAttributionResponse
$cfrom :: forall x.
DeleteMetricAttributionResponse
-> Rep DeleteMetricAttributionResponse x
Prelude.Generic)
newDeleteMetricAttributionResponse ::
DeleteMetricAttributionResponse
newDeleteMetricAttributionResponse :: DeleteMetricAttributionResponse
newDeleteMetricAttributionResponse =
DeleteMetricAttributionResponse
DeleteMetricAttributionResponse'
instance
Prelude.NFData
DeleteMetricAttributionResponse
where
rnf :: DeleteMetricAttributionResponse -> ()
rnf DeleteMetricAttributionResponse
_ = ()