{-# 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.GuardDuty.CreateFilter
(
CreateFilter (..),
newCreateFilter,
createFilter_clientToken,
createFilter_action,
createFilter_description,
createFilter_rank,
createFilter_tags,
createFilter_detectorId,
createFilter_name,
createFilter_findingCriteria,
CreateFilterResponse (..),
newCreateFilterResponse,
createFilterResponse_httpStatus,
createFilterResponse_name,
)
where
import qualified Amazonka.Core as Core
import Amazonka.GuardDuty.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 CreateFilter = CreateFilter'
{
CreateFilter -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateFilter -> Maybe FilterAction
action :: Prelude.Maybe FilterAction,
CreateFilter -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateFilter -> Maybe Natural
rank :: Prelude.Maybe Prelude.Natural,
CreateFilter -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateFilter -> Text
detectorId :: Prelude.Text,
CreateFilter -> Text
name :: Prelude.Text,
CreateFilter -> FindingCriteria
findingCriteria :: FindingCriteria
}
deriving (CreateFilter -> CreateFilter -> Bool
(CreateFilter -> CreateFilter -> Bool)
-> (CreateFilter -> CreateFilter -> Bool) -> Eq CreateFilter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFilter -> CreateFilter -> Bool
$c/= :: CreateFilter -> CreateFilter -> Bool
== :: CreateFilter -> CreateFilter -> Bool
$c== :: CreateFilter -> CreateFilter -> Bool
Prelude.Eq, ReadPrec [CreateFilter]
ReadPrec CreateFilter
Int -> ReadS CreateFilter
ReadS [CreateFilter]
(Int -> ReadS CreateFilter)
-> ReadS [CreateFilter]
-> ReadPrec CreateFilter
-> ReadPrec [CreateFilter]
-> Read CreateFilter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFilter]
$creadListPrec :: ReadPrec [CreateFilter]
readPrec :: ReadPrec CreateFilter
$creadPrec :: ReadPrec CreateFilter
readList :: ReadS [CreateFilter]
$creadList :: ReadS [CreateFilter]
readsPrec :: Int -> ReadS CreateFilter
$creadsPrec :: Int -> ReadS CreateFilter
Prelude.Read, Int -> CreateFilter -> ShowS
[CreateFilter] -> ShowS
CreateFilter -> String
(Int -> CreateFilter -> ShowS)
-> (CreateFilter -> String)
-> ([CreateFilter] -> ShowS)
-> Show CreateFilter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFilter] -> ShowS
$cshowList :: [CreateFilter] -> ShowS
show :: CreateFilter -> String
$cshow :: CreateFilter -> String
showsPrec :: Int -> CreateFilter -> ShowS
$cshowsPrec :: Int -> CreateFilter -> ShowS
Prelude.Show, (forall x. CreateFilter -> Rep CreateFilter x)
-> (forall x. Rep CreateFilter x -> CreateFilter)
-> Generic CreateFilter
forall x. Rep CreateFilter x -> CreateFilter
forall x. CreateFilter -> Rep CreateFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFilter x -> CreateFilter
$cfrom :: forall x. CreateFilter -> Rep CreateFilter x
Prelude.Generic)
newCreateFilter ::
Prelude.Text ->
Prelude.Text ->
FindingCriteria ->
CreateFilter
newCreateFilter :: Text -> Text -> FindingCriteria -> CreateFilter
newCreateFilter Text
pDetectorId_ Text
pName_ FindingCriteria
pFindingCriteria_ =
CreateFilter' :: Maybe Text
-> Maybe FilterAction
-> Maybe Text
-> Maybe Natural
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> FindingCriteria
-> CreateFilter
CreateFilter'
{ $sel:clientToken:CreateFilter' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:action:CreateFilter' :: Maybe FilterAction
action = Maybe FilterAction
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateFilter' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rank:CreateFilter' :: Maybe Natural
rank = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateFilter' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:detectorId:CreateFilter' :: Text
detectorId = Text
pDetectorId_,
$sel:name:CreateFilter' :: Text
name = Text
pName_,
$sel:findingCriteria:CreateFilter' :: FindingCriteria
findingCriteria = FindingCriteria
pFindingCriteria_
}
createFilter_clientToken :: Lens.Lens' CreateFilter (Prelude.Maybe Prelude.Text)
createFilter_clientToken :: (Maybe Text -> f (Maybe Text)) -> CreateFilter -> f CreateFilter
createFilter_clientToken = (CreateFilter -> Maybe Text)
-> (CreateFilter -> Maybe Text -> CreateFilter)
-> Lens CreateFilter CreateFilter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFilter' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateFilter' :: CreateFilter -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateFilter
s@CreateFilter' {} Maybe Text
a -> CreateFilter
s {$sel:clientToken:CreateFilter' :: Maybe Text
clientToken = Maybe Text
a} :: CreateFilter)
createFilter_action :: Lens.Lens' CreateFilter (Prelude.Maybe FilterAction)
createFilter_action :: (Maybe FilterAction -> f (Maybe FilterAction))
-> CreateFilter -> f CreateFilter
createFilter_action = (CreateFilter -> Maybe FilterAction)
-> (CreateFilter -> Maybe FilterAction -> CreateFilter)
-> Lens
CreateFilter CreateFilter (Maybe FilterAction) (Maybe FilterAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFilter' {Maybe FilterAction
action :: Maybe FilterAction
$sel:action:CreateFilter' :: CreateFilter -> Maybe FilterAction
action} -> Maybe FilterAction
action) (\s :: CreateFilter
s@CreateFilter' {} Maybe FilterAction
a -> CreateFilter
s {$sel:action:CreateFilter' :: Maybe FilterAction
action = Maybe FilterAction
a} :: CreateFilter)
createFilter_description :: Lens.Lens' CreateFilter (Prelude.Maybe Prelude.Text)
createFilter_description :: (Maybe Text -> f (Maybe Text)) -> CreateFilter -> f CreateFilter
createFilter_description = (CreateFilter -> Maybe Text)
-> (CreateFilter -> Maybe Text -> CreateFilter)
-> Lens CreateFilter CreateFilter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFilter' {Maybe Text
description :: Maybe Text
$sel:description:CreateFilter' :: CreateFilter -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateFilter
s@CreateFilter' {} Maybe Text
a -> CreateFilter
s {$sel:description:CreateFilter' :: Maybe Text
description = Maybe Text
a} :: CreateFilter)
createFilter_rank :: Lens.Lens' CreateFilter (Prelude.Maybe Prelude.Natural)
createFilter_rank :: (Maybe Natural -> f (Maybe Natural))
-> CreateFilter -> f CreateFilter
createFilter_rank = (CreateFilter -> Maybe Natural)
-> (CreateFilter -> Maybe Natural -> CreateFilter)
-> Lens CreateFilter CreateFilter (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFilter' {Maybe Natural
rank :: Maybe Natural
$sel:rank:CreateFilter' :: CreateFilter -> Maybe Natural
rank} -> Maybe Natural
rank) (\s :: CreateFilter
s@CreateFilter' {} Maybe Natural
a -> CreateFilter
s {$sel:rank:CreateFilter' :: Maybe Natural
rank = Maybe Natural
a} :: CreateFilter)
createFilter_tags :: Lens.Lens' CreateFilter (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createFilter_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFilter -> f CreateFilter
createFilter_tags = (CreateFilter -> Maybe (HashMap Text Text))
-> (CreateFilter -> Maybe (HashMap Text Text) -> CreateFilter)
-> Lens
CreateFilter
CreateFilter
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFilter' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateFilter' :: CreateFilter -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateFilter
s@CreateFilter' {} Maybe (HashMap Text Text)
a -> CreateFilter
s {$sel:tags:CreateFilter' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateFilter) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFilter -> f CreateFilter)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFilter
-> f CreateFilter
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFilter_detectorId :: Lens.Lens' CreateFilter Prelude.Text
createFilter_detectorId :: (Text -> f Text) -> CreateFilter -> f CreateFilter
createFilter_detectorId = (CreateFilter -> Text)
-> (CreateFilter -> Text -> CreateFilter)
-> Lens CreateFilter CreateFilter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFilter' {Text
detectorId :: Text
$sel:detectorId:CreateFilter' :: CreateFilter -> Text
detectorId} -> Text
detectorId) (\s :: CreateFilter
s@CreateFilter' {} Text
a -> CreateFilter
s {$sel:detectorId:CreateFilter' :: Text
detectorId = Text
a} :: CreateFilter)
createFilter_name :: Lens.Lens' CreateFilter Prelude.Text
createFilter_name :: (Text -> f Text) -> CreateFilter -> f CreateFilter
createFilter_name = (CreateFilter -> Text)
-> (CreateFilter -> Text -> CreateFilter)
-> Lens CreateFilter CreateFilter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFilter' {Text
name :: Text
$sel:name:CreateFilter' :: CreateFilter -> Text
name} -> Text
name) (\s :: CreateFilter
s@CreateFilter' {} Text
a -> CreateFilter
s {$sel:name:CreateFilter' :: Text
name = Text
a} :: CreateFilter)
createFilter_findingCriteria :: Lens.Lens' CreateFilter FindingCriteria
createFilter_findingCriteria :: (FindingCriteria -> f FindingCriteria)
-> CreateFilter -> f CreateFilter
createFilter_findingCriteria = (CreateFilter -> FindingCriteria)
-> (CreateFilter -> FindingCriteria -> CreateFilter)
-> Lens CreateFilter CreateFilter FindingCriteria FindingCriteria
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFilter' {FindingCriteria
findingCriteria :: FindingCriteria
$sel:findingCriteria:CreateFilter' :: CreateFilter -> FindingCriteria
findingCriteria} -> FindingCriteria
findingCriteria) (\s :: CreateFilter
s@CreateFilter' {} FindingCriteria
a -> CreateFilter
s {$sel:findingCriteria:CreateFilter' :: FindingCriteria
findingCriteria = FindingCriteria
a} :: CreateFilter)
instance Core.AWSRequest CreateFilter where
type AWSResponse CreateFilter = CreateFilterResponse
request :: CreateFilter -> Request CreateFilter
request = Service -> CreateFilter -> Request CreateFilter
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateFilter
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFilter)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateFilter))
-> Logger
-> Service
-> Proxy CreateFilter
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFilter)))
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 -> Text -> CreateFilterResponse
CreateFilterResponse'
(Int -> Text -> CreateFilterResponse)
-> Either String Int
-> Either String (Text -> CreateFilterResponse)
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 (Text -> CreateFilterResponse)
-> Either String Text -> Either String CreateFilterResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"name")
)
instance Prelude.Hashable CreateFilter
instance Prelude.NFData CreateFilter
instance Core.ToHeaders CreateFilter where
toHeaders :: CreateFilter -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateFilter -> 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.ToJSON CreateFilter where
toJSON :: CreateFilter -> Value
toJSON CreateFilter' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe FilterAction
Text
FindingCriteria
findingCriteria :: FindingCriteria
name :: Text
detectorId :: Text
tags :: Maybe (HashMap Text Text)
rank :: Maybe Natural
description :: Maybe Text
action :: Maybe FilterAction
clientToken :: Maybe Text
$sel:findingCriteria:CreateFilter' :: CreateFilter -> FindingCriteria
$sel:name:CreateFilter' :: CreateFilter -> Text
$sel:detectorId:CreateFilter' :: CreateFilter -> Text
$sel:tags:CreateFilter' :: CreateFilter -> Maybe (HashMap Text Text)
$sel:rank:CreateFilter' :: CreateFilter -> Maybe Natural
$sel:description:CreateFilter' :: CreateFilter -> Maybe Text
$sel:action:CreateFilter' :: CreateFilter -> Maybe FilterAction
$sel:clientToken:CreateFilter' :: CreateFilter -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"clientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
(Text
"action" Text -> FilterAction -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (FilterAction -> Pair) -> Maybe FilterAction -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FilterAction
action,
(Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Text
"rank" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
rank,
(Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"findingCriteria" Text -> FindingCriteria -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= FindingCriteria
findingCriteria)
]
)
instance Core.ToPath CreateFilter where
toPath :: CreateFilter -> ByteString
toPath CreateFilter' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe FilterAction
Text
FindingCriteria
findingCriteria :: FindingCriteria
name :: Text
detectorId :: Text
tags :: Maybe (HashMap Text Text)
rank :: Maybe Natural
description :: Maybe Text
action :: Maybe FilterAction
clientToken :: Maybe Text
$sel:findingCriteria:CreateFilter' :: CreateFilter -> FindingCriteria
$sel:name:CreateFilter' :: CreateFilter -> Text
$sel:detectorId:CreateFilter' :: CreateFilter -> Text
$sel:tags:CreateFilter' :: CreateFilter -> Maybe (HashMap Text Text)
$sel:rank:CreateFilter' :: CreateFilter -> Maybe Natural
$sel:description:CreateFilter' :: CreateFilter -> Maybe Text
$sel:action:CreateFilter' :: CreateFilter -> Maybe FilterAction
$sel:clientToken:CreateFilter' :: CreateFilter -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/detector/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
detectorId, ByteString
"/filter"]
instance Core.ToQuery CreateFilter where
toQuery :: CreateFilter -> QueryString
toQuery = QueryString -> CreateFilter -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateFilterResponse = CreateFilterResponse'
{
CreateFilterResponse -> Int
httpStatus :: Prelude.Int,
CreateFilterResponse -> Text
name :: Prelude.Text
}
deriving (CreateFilterResponse -> CreateFilterResponse -> Bool
(CreateFilterResponse -> CreateFilterResponse -> Bool)
-> (CreateFilterResponse -> CreateFilterResponse -> Bool)
-> Eq CreateFilterResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFilterResponse -> CreateFilterResponse -> Bool
$c/= :: CreateFilterResponse -> CreateFilterResponse -> Bool
== :: CreateFilterResponse -> CreateFilterResponse -> Bool
$c== :: CreateFilterResponse -> CreateFilterResponse -> Bool
Prelude.Eq, ReadPrec [CreateFilterResponse]
ReadPrec CreateFilterResponse
Int -> ReadS CreateFilterResponse
ReadS [CreateFilterResponse]
(Int -> ReadS CreateFilterResponse)
-> ReadS [CreateFilterResponse]
-> ReadPrec CreateFilterResponse
-> ReadPrec [CreateFilterResponse]
-> Read CreateFilterResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFilterResponse]
$creadListPrec :: ReadPrec [CreateFilterResponse]
readPrec :: ReadPrec CreateFilterResponse
$creadPrec :: ReadPrec CreateFilterResponse
readList :: ReadS [CreateFilterResponse]
$creadList :: ReadS [CreateFilterResponse]
readsPrec :: Int -> ReadS CreateFilterResponse
$creadsPrec :: Int -> ReadS CreateFilterResponse
Prelude.Read, Int -> CreateFilterResponse -> ShowS
[CreateFilterResponse] -> ShowS
CreateFilterResponse -> String
(Int -> CreateFilterResponse -> ShowS)
-> (CreateFilterResponse -> String)
-> ([CreateFilterResponse] -> ShowS)
-> Show CreateFilterResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFilterResponse] -> ShowS
$cshowList :: [CreateFilterResponse] -> ShowS
show :: CreateFilterResponse -> String
$cshow :: CreateFilterResponse -> String
showsPrec :: Int -> CreateFilterResponse -> ShowS
$cshowsPrec :: Int -> CreateFilterResponse -> ShowS
Prelude.Show, (forall x. CreateFilterResponse -> Rep CreateFilterResponse x)
-> (forall x. Rep CreateFilterResponse x -> CreateFilterResponse)
-> Generic CreateFilterResponse
forall x. Rep CreateFilterResponse x -> CreateFilterResponse
forall x. CreateFilterResponse -> Rep CreateFilterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFilterResponse x -> CreateFilterResponse
$cfrom :: forall x. CreateFilterResponse -> Rep CreateFilterResponse x
Prelude.Generic)
newCreateFilterResponse ::
Prelude.Int ->
Prelude.Text ->
CreateFilterResponse
newCreateFilterResponse :: Int -> Text -> CreateFilterResponse
newCreateFilterResponse Int
pHttpStatus_ Text
pName_ =
CreateFilterResponse' :: Int -> Text -> CreateFilterResponse
CreateFilterResponse'
{ $sel:httpStatus:CreateFilterResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:name:CreateFilterResponse' :: Text
name = Text
pName_
}
createFilterResponse_httpStatus :: Lens.Lens' CreateFilterResponse Prelude.Int
createFilterResponse_httpStatus :: (Int -> f Int) -> CreateFilterResponse -> f CreateFilterResponse
createFilterResponse_httpStatus = (CreateFilterResponse -> Int)
-> (CreateFilterResponse -> Int -> CreateFilterResponse)
-> Lens CreateFilterResponse CreateFilterResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFilterResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateFilterResponse' :: CreateFilterResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateFilterResponse
s@CreateFilterResponse' {} Int
a -> CreateFilterResponse
s {$sel:httpStatus:CreateFilterResponse' :: Int
httpStatus = Int
a} :: CreateFilterResponse)
createFilterResponse_name :: Lens.Lens' CreateFilterResponse Prelude.Text
createFilterResponse_name :: (Text -> f Text) -> CreateFilterResponse -> f CreateFilterResponse
createFilterResponse_name = (CreateFilterResponse -> Text)
-> (CreateFilterResponse -> Text -> CreateFilterResponse)
-> Lens CreateFilterResponse CreateFilterResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFilterResponse' {Text
name :: Text
$sel:name:CreateFilterResponse' :: CreateFilterResponse -> Text
name} -> Text
name) (\s :: CreateFilterResponse
s@CreateFilterResponse' {} Text
a -> CreateFilterResponse
s {$sel:name:CreateFilterResponse' :: Text
name = Text
a} :: CreateFilterResponse)
instance Prelude.NFData CreateFilterResponse