{-# 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.FraudDetector.UpdateDetectorVersionMetadata
(
UpdateDetectorVersionMetadata (..),
newUpdateDetectorVersionMetadata,
updateDetectorVersionMetadata_detectorId,
updateDetectorVersionMetadata_detectorVersionId,
updateDetectorVersionMetadata_description,
UpdateDetectorVersionMetadataResponse (..),
newUpdateDetectorVersionMetadataResponse,
updateDetectorVersionMetadataResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.Types
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 UpdateDetectorVersionMetadata = UpdateDetectorVersionMetadata'
{
UpdateDetectorVersionMetadata -> Text
detectorId :: Prelude.Text,
UpdateDetectorVersionMetadata -> Text
detectorVersionId :: Prelude.Text,
UpdateDetectorVersionMetadata -> Text
description :: Prelude.Text
}
deriving (UpdateDetectorVersionMetadata
-> UpdateDetectorVersionMetadata -> Bool
(UpdateDetectorVersionMetadata
-> UpdateDetectorVersionMetadata -> Bool)
-> (UpdateDetectorVersionMetadata
-> UpdateDetectorVersionMetadata -> Bool)
-> Eq UpdateDetectorVersionMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDetectorVersionMetadata
-> UpdateDetectorVersionMetadata -> Bool
$c/= :: UpdateDetectorVersionMetadata
-> UpdateDetectorVersionMetadata -> Bool
== :: UpdateDetectorVersionMetadata
-> UpdateDetectorVersionMetadata -> Bool
$c== :: UpdateDetectorVersionMetadata
-> UpdateDetectorVersionMetadata -> Bool
Prelude.Eq, ReadPrec [UpdateDetectorVersionMetadata]
ReadPrec UpdateDetectorVersionMetadata
Int -> ReadS UpdateDetectorVersionMetadata
ReadS [UpdateDetectorVersionMetadata]
(Int -> ReadS UpdateDetectorVersionMetadata)
-> ReadS [UpdateDetectorVersionMetadata]
-> ReadPrec UpdateDetectorVersionMetadata
-> ReadPrec [UpdateDetectorVersionMetadata]
-> Read UpdateDetectorVersionMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDetectorVersionMetadata]
$creadListPrec :: ReadPrec [UpdateDetectorVersionMetadata]
readPrec :: ReadPrec UpdateDetectorVersionMetadata
$creadPrec :: ReadPrec UpdateDetectorVersionMetadata
readList :: ReadS [UpdateDetectorVersionMetadata]
$creadList :: ReadS [UpdateDetectorVersionMetadata]
readsPrec :: Int -> ReadS UpdateDetectorVersionMetadata
$creadsPrec :: Int -> ReadS UpdateDetectorVersionMetadata
Prelude.Read, Int -> UpdateDetectorVersionMetadata -> ShowS
[UpdateDetectorVersionMetadata] -> ShowS
UpdateDetectorVersionMetadata -> String
(Int -> UpdateDetectorVersionMetadata -> ShowS)
-> (UpdateDetectorVersionMetadata -> String)
-> ([UpdateDetectorVersionMetadata] -> ShowS)
-> Show UpdateDetectorVersionMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDetectorVersionMetadata] -> ShowS
$cshowList :: [UpdateDetectorVersionMetadata] -> ShowS
show :: UpdateDetectorVersionMetadata -> String
$cshow :: UpdateDetectorVersionMetadata -> String
showsPrec :: Int -> UpdateDetectorVersionMetadata -> ShowS
$cshowsPrec :: Int -> UpdateDetectorVersionMetadata -> ShowS
Prelude.Show, (forall x.
UpdateDetectorVersionMetadata
-> Rep UpdateDetectorVersionMetadata x)
-> (forall x.
Rep UpdateDetectorVersionMetadata x
-> UpdateDetectorVersionMetadata)
-> Generic UpdateDetectorVersionMetadata
forall x.
Rep UpdateDetectorVersionMetadata x
-> UpdateDetectorVersionMetadata
forall x.
UpdateDetectorVersionMetadata
-> Rep UpdateDetectorVersionMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDetectorVersionMetadata x
-> UpdateDetectorVersionMetadata
$cfrom :: forall x.
UpdateDetectorVersionMetadata
-> Rep UpdateDetectorVersionMetadata x
Prelude.Generic)
newUpdateDetectorVersionMetadata ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
UpdateDetectorVersionMetadata
newUpdateDetectorVersionMetadata :: Text -> Text -> Text -> UpdateDetectorVersionMetadata
newUpdateDetectorVersionMetadata
Text
pDetectorId_
Text
pDetectorVersionId_
Text
pDescription_ =
UpdateDetectorVersionMetadata' :: Text -> Text -> Text -> UpdateDetectorVersionMetadata
UpdateDetectorVersionMetadata'
{ $sel:detectorId:UpdateDetectorVersionMetadata' :: Text
detectorId =
Text
pDetectorId_,
$sel:detectorVersionId:UpdateDetectorVersionMetadata' :: Text
detectorVersionId = Text
pDetectorVersionId_,
$sel:description:UpdateDetectorVersionMetadata' :: Text
description = Text
pDescription_
}
updateDetectorVersionMetadata_detectorId :: Lens.Lens' UpdateDetectorVersionMetadata Prelude.Text
updateDetectorVersionMetadata_detectorId :: (Text -> f Text)
-> UpdateDetectorVersionMetadata -> f UpdateDetectorVersionMetadata
updateDetectorVersionMetadata_detectorId = (UpdateDetectorVersionMetadata -> Text)
-> (UpdateDetectorVersionMetadata
-> Text -> UpdateDetectorVersionMetadata)
-> Lens
UpdateDetectorVersionMetadata
UpdateDetectorVersionMetadata
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDetectorVersionMetadata' {Text
detectorId :: Text
$sel:detectorId:UpdateDetectorVersionMetadata' :: UpdateDetectorVersionMetadata -> Text
detectorId} -> Text
detectorId) (\s :: UpdateDetectorVersionMetadata
s@UpdateDetectorVersionMetadata' {} Text
a -> UpdateDetectorVersionMetadata
s {$sel:detectorId:UpdateDetectorVersionMetadata' :: Text
detectorId = Text
a} :: UpdateDetectorVersionMetadata)
updateDetectorVersionMetadata_detectorVersionId :: Lens.Lens' UpdateDetectorVersionMetadata Prelude.Text
updateDetectorVersionMetadata_detectorVersionId :: (Text -> f Text)
-> UpdateDetectorVersionMetadata -> f UpdateDetectorVersionMetadata
updateDetectorVersionMetadata_detectorVersionId = (UpdateDetectorVersionMetadata -> Text)
-> (UpdateDetectorVersionMetadata
-> Text -> UpdateDetectorVersionMetadata)
-> Lens
UpdateDetectorVersionMetadata
UpdateDetectorVersionMetadata
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDetectorVersionMetadata' {Text
detectorVersionId :: Text
$sel:detectorVersionId:UpdateDetectorVersionMetadata' :: UpdateDetectorVersionMetadata -> Text
detectorVersionId} -> Text
detectorVersionId) (\s :: UpdateDetectorVersionMetadata
s@UpdateDetectorVersionMetadata' {} Text
a -> UpdateDetectorVersionMetadata
s {$sel:detectorVersionId:UpdateDetectorVersionMetadata' :: Text
detectorVersionId = Text
a} :: UpdateDetectorVersionMetadata)
updateDetectorVersionMetadata_description :: Lens.Lens' UpdateDetectorVersionMetadata Prelude.Text
updateDetectorVersionMetadata_description :: (Text -> f Text)
-> UpdateDetectorVersionMetadata -> f UpdateDetectorVersionMetadata
updateDetectorVersionMetadata_description = (UpdateDetectorVersionMetadata -> Text)
-> (UpdateDetectorVersionMetadata
-> Text -> UpdateDetectorVersionMetadata)
-> Lens
UpdateDetectorVersionMetadata
UpdateDetectorVersionMetadata
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDetectorVersionMetadata' {Text
description :: Text
$sel:description:UpdateDetectorVersionMetadata' :: UpdateDetectorVersionMetadata -> Text
description} -> Text
description) (\s :: UpdateDetectorVersionMetadata
s@UpdateDetectorVersionMetadata' {} Text
a -> UpdateDetectorVersionMetadata
s {$sel:description:UpdateDetectorVersionMetadata' :: Text
description = Text
a} :: UpdateDetectorVersionMetadata)
instance
Core.AWSRequest
UpdateDetectorVersionMetadata
where
type
AWSResponse UpdateDetectorVersionMetadata =
UpdateDetectorVersionMetadataResponse
request :: UpdateDetectorVersionMetadata
-> Request UpdateDetectorVersionMetadata
request = Service
-> UpdateDetectorVersionMetadata
-> Request UpdateDetectorVersionMetadata
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateDetectorVersionMetadata
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateDetectorVersionMetadata)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse UpdateDetectorVersionMetadata))
-> Logger
-> Service
-> Proxy UpdateDetectorVersionMetadata
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateDetectorVersionMetadata)))
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 -> UpdateDetectorVersionMetadataResponse
UpdateDetectorVersionMetadataResponse'
(Int -> UpdateDetectorVersionMetadataResponse)
-> Either String Int
-> Either String UpdateDetectorVersionMetadataResponse
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
UpdateDetectorVersionMetadata
instance Prelude.NFData UpdateDetectorVersionMetadata
instance Core.ToHeaders UpdateDetectorVersionMetadata where
toHeaders :: UpdateDetectorVersionMetadata -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateDetectorVersionMetadata -> 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
"AWSHawksNestServiceFacade.UpdateDetectorVersionMetadata" ::
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 UpdateDetectorVersionMetadata where
toJSON :: UpdateDetectorVersionMetadata -> Value
toJSON UpdateDetectorVersionMetadata' {Text
description :: Text
detectorVersionId :: Text
detectorId :: Text
$sel:description:UpdateDetectorVersionMetadata' :: UpdateDetectorVersionMetadata -> Text
$sel:detectorVersionId:UpdateDetectorVersionMetadata' :: UpdateDetectorVersionMetadata -> Text
$sel:detectorId:UpdateDetectorVersionMetadata' :: UpdateDetectorVersionMetadata -> 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
"detectorId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
detectorId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"detectorVersionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
detectorVersionId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
description)
]
)
instance Core.ToPath UpdateDetectorVersionMetadata where
toPath :: UpdateDetectorVersionMetadata -> ByteString
toPath = ByteString -> UpdateDetectorVersionMetadata -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateDetectorVersionMetadata where
toQuery :: UpdateDetectorVersionMetadata -> QueryString
toQuery = QueryString -> UpdateDetectorVersionMetadata -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateDetectorVersionMetadataResponse = UpdateDetectorVersionMetadataResponse'
{
UpdateDetectorVersionMetadataResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateDetectorVersionMetadataResponse
-> UpdateDetectorVersionMetadataResponse -> Bool
(UpdateDetectorVersionMetadataResponse
-> UpdateDetectorVersionMetadataResponse -> Bool)
-> (UpdateDetectorVersionMetadataResponse
-> UpdateDetectorVersionMetadataResponse -> Bool)
-> Eq UpdateDetectorVersionMetadataResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDetectorVersionMetadataResponse
-> UpdateDetectorVersionMetadataResponse -> Bool
$c/= :: UpdateDetectorVersionMetadataResponse
-> UpdateDetectorVersionMetadataResponse -> Bool
== :: UpdateDetectorVersionMetadataResponse
-> UpdateDetectorVersionMetadataResponse -> Bool
$c== :: UpdateDetectorVersionMetadataResponse
-> UpdateDetectorVersionMetadataResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDetectorVersionMetadataResponse]
ReadPrec UpdateDetectorVersionMetadataResponse
Int -> ReadS UpdateDetectorVersionMetadataResponse
ReadS [UpdateDetectorVersionMetadataResponse]
(Int -> ReadS UpdateDetectorVersionMetadataResponse)
-> ReadS [UpdateDetectorVersionMetadataResponse]
-> ReadPrec UpdateDetectorVersionMetadataResponse
-> ReadPrec [UpdateDetectorVersionMetadataResponse]
-> Read UpdateDetectorVersionMetadataResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDetectorVersionMetadataResponse]
$creadListPrec :: ReadPrec [UpdateDetectorVersionMetadataResponse]
readPrec :: ReadPrec UpdateDetectorVersionMetadataResponse
$creadPrec :: ReadPrec UpdateDetectorVersionMetadataResponse
readList :: ReadS [UpdateDetectorVersionMetadataResponse]
$creadList :: ReadS [UpdateDetectorVersionMetadataResponse]
readsPrec :: Int -> ReadS UpdateDetectorVersionMetadataResponse
$creadsPrec :: Int -> ReadS UpdateDetectorVersionMetadataResponse
Prelude.Read, Int -> UpdateDetectorVersionMetadataResponse -> ShowS
[UpdateDetectorVersionMetadataResponse] -> ShowS
UpdateDetectorVersionMetadataResponse -> String
(Int -> UpdateDetectorVersionMetadataResponse -> ShowS)
-> (UpdateDetectorVersionMetadataResponse -> String)
-> ([UpdateDetectorVersionMetadataResponse] -> ShowS)
-> Show UpdateDetectorVersionMetadataResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDetectorVersionMetadataResponse] -> ShowS
$cshowList :: [UpdateDetectorVersionMetadataResponse] -> ShowS
show :: UpdateDetectorVersionMetadataResponse -> String
$cshow :: UpdateDetectorVersionMetadataResponse -> String
showsPrec :: Int -> UpdateDetectorVersionMetadataResponse -> ShowS
$cshowsPrec :: Int -> UpdateDetectorVersionMetadataResponse -> ShowS
Prelude.Show, (forall x.
UpdateDetectorVersionMetadataResponse
-> Rep UpdateDetectorVersionMetadataResponse x)
-> (forall x.
Rep UpdateDetectorVersionMetadataResponse x
-> UpdateDetectorVersionMetadataResponse)
-> Generic UpdateDetectorVersionMetadataResponse
forall x.
Rep UpdateDetectorVersionMetadataResponse x
-> UpdateDetectorVersionMetadataResponse
forall x.
UpdateDetectorVersionMetadataResponse
-> Rep UpdateDetectorVersionMetadataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDetectorVersionMetadataResponse x
-> UpdateDetectorVersionMetadataResponse
$cfrom :: forall x.
UpdateDetectorVersionMetadataResponse
-> Rep UpdateDetectorVersionMetadataResponse x
Prelude.Generic)
newUpdateDetectorVersionMetadataResponse ::
Prelude.Int ->
UpdateDetectorVersionMetadataResponse
newUpdateDetectorVersionMetadataResponse :: Int -> UpdateDetectorVersionMetadataResponse
newUpdateDetectorVersionMetadataResponse Int
pHttpStatus_ =
UpdateDetectorVersionMetadataResponse' :: Int -> UpdateDetectorVersionMetadataResponse
UpdateDetectorVersionMetadataResponse'
{ $sel:httpStatus:UpdateDetectorVersionMetadataResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
updateDetectorVersionMetadataResponse_httpStatus :: Lens.Lens' UpdateDetectorVersionMetadataResponse Prelude.Int
updateDetectorVersionMetadataResponse_httpStatus :: (Int -> f Int)
-> UpdateDetectorVersionMetadataResponse
-> f UpdateDetectorVersionMetadataResponse
updateDetectorVersionMetadataResponse_httpStatus = (UpdateDetectorVersionMetadataResponse -> Int)
-> (UpdateDetectorVersionMetadataResponse
-> Int -> UpdateDetectorVersionMetadataResponse)
-> Lens
UpdateDetectorVersionMetadataResponse
UpdateDetectorVersionMetadataResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDetectorVersionMetadataResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateDetectorVersionMetadataResponse' :: UpdateDetectorVersionMetadataResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateDetectorVersionMetadataResponse
s@UpdateDetectorVersionMetadataResponse' {} Int
a -> UpdateDetectorVersionMetadataResponse
s {$sel:httpStatus:UpdateDetectorVersionMetadataResponse' :: Int
httpStatus = Int
a} :: UpdateDetectorVersionMetadataResponse)
instance
Prelude.NFData
UpdateDetectorVersionMetadataResponse