{-# 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.WAFV2.CreateRuleGroup
(
CreateRuleGroup (..),
newCreateRuleGroup,
createRuleGroup_customResponseBodies,
createRuleGroup_description,
createRuleGroup_rules,
createRuleGroup_tags,
createRuleGroup_name,
createRuleGroup_scope,
createRuleGroup_capacity,
createRuleGroup_visibilityConfig,
CreateRuleGroupResponse (..),
newCreateRuleGroupResponse,
createRuleGroupResponse_summary,
createRuleGroupResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WAFV2.Types
data CreateRuleGroup = CreateRuleGroup'
{
CreateRuleGroup -> Maybe (HashMap Text CustomResponseBody)
customResponseBodies :: Prelude.Maybe (Prelude.HashMap Prelude.Text CustomResponseBody),
CreateRuleGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateRuleGroup -> Maybe [Rule]
rules :: Prelude.Maybe [Rule],
CreateRuleGroup -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
CreateRuleGroup -> Text
name :: Prelude.Text,
CreateRuleGroup -> Scope
scope :: Scope,
CreateRuleGroup -> Natural
capacity :: Prelude.Natural,
CreateRuleGroup -> VisibilityConfig
visibilityConfig :: VisibilityConfig
}
deriving (CreateRuleGroup -> CreateRuleGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRuleGroup -> CreateRuleGroup -> Bool
$c/= :: CreateRuleGroup -> CreateRuleGroup -> Bool
== :: CreateRuleGroup -> CreateRuleGroup -> Bool
$c== :: CreateRuleGroup -> CreateRuleGroup -> Bool
Prelude.Eq, ReadPrec [CreateRuleGroup]
ReadPrec CreateRuleGroup
Int -> ReadS CreateRuleGroup
ReadS [CreateRuleGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRuleGroup]
$creadListPrec :: ReadPrec [CreateRuleGroup]
readPrec :: ReadPrec CreateRuleGroup
$creadPrec :: ReadPrec CreateRuleGroup
readList :: ReadS [CreateRuleGroup]
$creadList :: ReadS [CreateRuleGroup]
readsPrec :: Int -> ReadS CreateRuleGroup
$creadsPrec :: Int -> ReadS CreateRuleGroup
Prelude.Read, Int -> CreateRuleGroup -> ShowS
[CreateRuleGroup] -> ShowS
CreateRuleGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRuleGroup] -> ShowS
$cshowList :: [CreateRuleGroup] -> ShowS
show :: CreateRuleGroup -> String
$cshow :: CreateRuleGroup -> String
showsPrec :: Int -> CreateRuleGroup -> ShowS
$cshowsPrec :: Int -> CreateRuleGroup -> ShowS
Prelude.Show, forall x. Rep CreateRuleGroup x -> CreateRuleGroup
forall x. CreateRuleGroup -> Rep CreateRuleGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRuleGroup x -> CreateRuleGroup
$cfrom :: forall x. CreateRuleGroup -> Rep CreateRuleGroup x
Prelude.Generic)
newCreateRuleGroup ::
Prelude.Text ->
Scope ->
Prelude.Natural ->
VisibilityConfig ->
CreateRuleGroup
newCreateRuleGroup :: Text -> Scope -> Natural -> VisibilityConfig -> CreateRuleGroup
newCreateRuleGroup
Text
pName_
Scope
pScope_
Natural
pCapacity_
VisibilityConfig
pVisibilityConfig_ =
CreateRuleGroup'
{ $sel:customResponseBodies:CreateRuleGroup' :: Maybe (HashMap Text CustomResponseBody)
customResponseBodies =
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateRuleGroup' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:rules:CreateRuleGroup' :: Maybe [Rule]
rules = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateRuleGroup' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateRuleGroup' :: Text
name = Text
pName_,
$sel:scope:CreateRuleGroup' :: Scope
scope = Scope
pScope_,
$sel:capacity:CreateRuleGroup' :: Natural
capacity = Natural
pCapacity_,
$sel:visibilityConfig:CreateRuleGroup' :: VisibilityConfig
visibilityConfig = VisibilityConfig
pVisibilityConfig_
}
createRuleGroup_customResponseBodies :: Lens.Lens' CreateRuleGroup (Prelude.Maybe (Prelude.HashMap Prelude.Text CustomResponseBody))
createRuleGroup_customResponseBodies :: Lens' CreateRuleGroup (Maybe (HashMap Text CustomResponseBody))
createRuleGroup_customResponseBodies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRuleGroup' {Maybe (HashMap Text CustomResponseBody)
customResponseBodies :: Maybe (HashMap Text CustomResponseBody)
$sel:customResponseBodies:CreateRuleGroup' :: CreateRuleGroup -> Maybe (HashMap Text CustomResponseBody)
customResponseBodies} -> Maybe (HashMap Text CustomResponseBody)
customResponseBodies) (\s :: CreateRuleGroup
s@CreateRuleGroup' {} Maybe (HashMap Text CustomResponseBody)
a -> CreateRuleGroup
s {$sel:customResponseBodies:CreateRuleGroup' :: Maybe (HashMap Text CustomResponseBody)
customResponseBodies = Maybe (HashMap Text CustomResponseBody)
a} :: CreateRuleGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createRuleGroup_description :: Lens.Lens' CreateRuleGroup (Prelude.Maybe Prelude.Text)
createRuleGroup_description :: Lens' CreateRuleGroup (Maybe Text)
createRuleGroup_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRuleGroup' {Maybe Text
description :: Maybe Text
$sel:description:CreateRuleGroup' :: CreateRuleGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateRuleGroup
s@CreateRuleGroup' {} Maybe Text
a -> CreateRuleGroup
s {$sel:description:CreateRuleGroup' :: Maybe Text
description = Maybe Text
a} :: CreateRuleGroup)
createRuleGroup_rules :: Lens.Lens' CreateRuleGroup (Prelude.Maybe [Rule])
createRuleGroup_rules :: Lens' CreateRuleGroup (Maybe [Rule])
createRuleGroup_rules = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRuleGroup' {Maybe [Rule]
rules :: Maybe [Rule]
$sel:rules:CreateRuleGroup' :: CreateRuleGroup -> Maybe [Rule]
rules} -> Maybe [Rule]
rules) (\s :: CreateRuleGroup
s@CreateRuleGroup' {} Maybe [Rule]
a -> CreateRuleGroup
s {$sel:rules:CreateRuleGroup' :: Maybe [Rule]
rules = Maybe [Rule]
a} :: CreateRuleGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createRuleGroup_tags :: Lens.Lens' CreateRuleGroup (Prelude.Maybe (Prelude.NonEmpty Tag))
createRuleGroup_tags :: Lens' CreateRuleGroup (Maybe (NonEmpty Tag))
createRuleGroup_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRuleGroup' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateRuleGroup' :: CreateRuleGroup -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateRuleGroup
s@CreateRuleGroup' {} Maybe (NonEmpty Tag)
a -> CreateRuleGroup
s {$sel:tags:CreateRuleGroup' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateRuleGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createRuleGroup_name :: Lens.Lens' CreateRuleGroup Prelude.Text
createRuleGroup_name :: Lens' CreateRuleGroup Text
createRuleGroup_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRuleGroup' {Text
name :: Text
$sel:name:CreateRuleGroup' :: CreateRuleGroup -> Text
name} -> Text
name) (\s :: CreateRuleGroup
s@CreateRuleGroup' {} Text
a -> CreateRuleGroup
s {$sel:name:CreateRuleGroup' :: Text
name = Text
a} :: CreateRuleGroup)
createRuleGroup_scope :: Lens.Lens' CreateRuleGroup Scope
createRuleGroup_scope :: Lens' CreateRuleGroup Scope
createRuleGroup_scope = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRuleGroup' {Scope
scope :: Scope
$sel:scope:CreateRuleGroup' :: CreateRuleGroup -> Scope
scope} -> Scope
scope) (\s :: CreateRuleGroup
s@CreateRuleGroup' {} Scope
a -> CreateRuleGroup
s {$sel:scope:CreateRuleGroup' :: Scope
scope = Scope
a} :: CreateRuleGroup)
createRuleGroup_capacity :: Lens.Lens' CreateRuleGroup Prelude.Natural
createRuleGroup_capacity :: Lens' CreateRuleGroup Natural
createRuleGroup_capacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRuleGroup' {Natural
capacity :: Natural
$sel:capacity:CreateRuleGroup' :: CreateRuleGroup -> Natural
capacity} -> Natural
capacity) (\s :: CreateRuleGroup
s@CreateRuleGroup' {} Natural
a -> CreateRuleGroup
s {$sel:capacity:CreateRuleGroup' :: Natural
capacity = Natural
a} :: CreateRuleGroup)
createRuleGroup_visibilityConfig :: Lens.Lens' CreateRuleGroup VisibilityConfig
createRuleGroup_visibilityConfig :: Lens' CreateRuleGroup VisibilityConfig
createRuleGroup_visibilityConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRuleGroup' {VisibilityConfig
visibilityConfig :: VisibilityConfig
$sel:visibilityConfig:CreateRuleGroup' :: CreateRuleGroup -> VisibilityConfig
visibilityConfig} -> VisibilityConfig
visibilityConfig) (\s :: CreateRuleGroup
s@CreateRuleGroup' {} VisibilityConfig
a -> CreateRuleGroup
s {$sel:visibilityConfig:CreateRuleGroup' :: VisibilityConfig
visibilityConfig = VisibilityConfig
a} :: CreateRuleGroup)
instance Core.AWSRequest CreateRuleGroup where
type
AWSResponse CreateRuleGroup =
CreateRuleGroupResponse
request :: (Service -> Service) -> CreateRuleGroup -> Request CreateRuleGroup
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 CreateRuleGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateRuleGroup)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe RuleGroupSummary -> Int -> CreateRuleGroupResponse
CreateRuleGroupResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Summary")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateRuleGroup where
hashWithSalt :: Int -> CreateRuleGroup -> Int
hashWithSalt Int
_salt CreateRuleGroup' {Natural
Maybe [Rule]
Maybe (NonEmpty Tag)
Maybe Text
Maybe (HashMap Text CustomResponseBody)
Text
Scope
VisibilityConfig
visibilityConfig :: VisibilityConfig
capacity :: Natural
scope :: Scope
name :: Text
tags :: Maybe (NonEmpty Tag)
rules :: Maybe [Rule]
description :: Maybe Text
customResponseBodies :: Maybe (HashMap Text CustomResponseBody)
$sel:visibilityConfig:CreateRuleGroup' :: CreateRuleGroup -> VisibilityConfig
$sel:capacity:CreateRuleGroup' :: CreateRuleGroup -> Natural
$sel:scope:CreateRuleGroup' :: CreateRuleGroup -> Scope
$sel:name:CreateRuleGroup' :: CreateRuleGroup -> Text
$sel:tags:CreateRuleGroup' :: CreateRuleGroup -> Maybe (NonEmpty Tag)
$sel:rules:CreateRuleGroup' :: CreateRuleGroup -> Maybe [Rule]
$sel:description:CreateRuleGroup' :: CreateRuleGroup -> Maybe Text
$sel:customResponseBodies:CreateRuleGroup' :: CreateRuleGroup -> Maybe (HashMap Text CustomResponseBody)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text CustomResponseBody)
customResponseBodies
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Rule]
rules
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Scope
scope
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
capacity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VisibilityConfig
visibilityConfig
instance Prelude.NFData CreateRuleGroup where
rnf :: CreateRuleGroup -> ()
rnf CreateRuleGroup' {Natural
Maybe [Rule]
Maybe (NonEmpty Tag)
Maybe Text
Maybe (HashMap Text CustomResponseBody)
Text
Scope
VisibilityConfig
visibilityConfig :: VisibilityConfig
capacity :: Natural
scope :: Scope
name :: Text
tags :: Maybe (NonEmpty Tag)
rules :: Maybe [Rule]
description :: Maybe Text
customResponseBodies :: Maybe (HashMap Text CustomResponseBody)
$sel:visibilityConfig:CreateRuleGroup' :: CreateRuleGroup -> VisibilityConfig
$sel:capacity:CreateRuleGroup' :: CreateRuleGroup -> Natural
$sel:scope:CreateRuleGroup' :: CreateRuleGroup -> Scope
$sel:name:CreateRuleGroup' :: CreateRuleGroup -> Text
$sel:tags:CreateRuleGroup' :: CreateRuleGroup -> Maybe (NonEmpty Tag)
$sel:rules:CreateRuleGroup' :: CreateRuleGroup -> Maybe [Rule]
$sel:description:CreateRuleGroup' :: CreateRuleGroup -> Maybe Text
$sel:customResponseBodies:CreateRuleGroup' :: CreateRuleGroup -> Maybe (HashMap Text CustomResponseBody)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text CustomResponseBody)
customResponseBodies
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Rule]
rules
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Scope
scope
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
capacity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VisibilityConfig
visibilityConfig
instance Data.ToHeaders CreateRuleGroup where
toHeaders :: CreateRuleGroup -> ResponseHeaders
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 -> ResponseHeaders
Data.=# ( ByteString
"AWSWAF_20190729.CreateRuleGroup" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateRuleGroup where
toJSON :: CreateRuleGroup -> Value
toJSON CreateRuleGroup' {Natural
Maybe [Rule]
Maybe (NonEmpty Tag)
Maybe Text
Maybe (HashMap Text CustomResponseBody)
Text
Scope
VisibilityConfig
visibilityConfig :: VisibilityConfig
capacity :: Natural
scope :: Scope
name :: Text
tags :: Maybe (NonEmpty Tag)
rules :: Maybe [Rule]
description :: Maybe Text
customResponseBodies :: Maybe (HashMap Text CustomResponseBody)
$sel:visibilityConfig:CreateRuleGroup' :: CreateRuleGroup -> VisibilityConfig
$sel:capacity:CreateRuleGroup' :: CreateRuleGroup -> Natural
$sel:scope:CreateRuleGroup' :: CreateRuleGroup -> Scope
$sel:name:CreateRuleGroup' :: CreateRuleGroup -> Text
$sel:tags:CreateRuleGroup' :: CreateRuleGroup -> Maybe (NonEmpty Tag)
$sel:rules:CreateRuleGroup' :: CreateRuleGroup -> Maybe [Rule]
$sel:description:CreateRuleGroup' :: CreateRuleGroup -> Maybe Text
$sel:customResponseBodies:CreateRuleGroup' :: CreateRuleGroup -> Maybe (HashMap Text CustomResponseBody)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"CustomResponseBodies" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text CustomResponseBody)
customResponseBodies,
(Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"Rules" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Rule]
rules,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Tag)
tags,
forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
forall a. a -> Maybe a
Prelude.Just (Key
"Scope" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Scope
scope),
forall a. a -> Maybe a
Prelude.Just (Key
"Capacity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
capacity),
forall a. a -> Maybe a
Prelude.Just
(Key
"VisibilityConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= VisibilityConfig
visibilityConfig)
]
)
instance Data.ToPath CreateRuleGroup where
toPath :: CreateRuleGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateRuleGroup where
toQuery :: CreateRuleGroup -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateRuleGroupResponse = CreateRuleGroupResponse'
{
CreateRuleGroupResponse -> Maybe RuleGroupSummary
summary :: Prelude.Maybe RuleGroupSummary,
CreateRuleGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateRuleGroupResponse -> CreateRuleGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRuleGroupResponse -> CreateRuleGroupResponse -> Bool
$c/= :: CreateRuleGroupResponse -> CreateRuleGroupResponse -> Bool
== :: CreateRuleGroupResponse -> CreateRuleGroupResponse -> Bool
$c== :: CreateRuleGroupResponse -> CreateRuleGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateRuleGroupResponse]
ReadPrec CreateRuleGroupResponse
Int -> ReadS CreateRuleGroupResponse
ReadS [CreateRuleGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRuleGroupResponse]
$creadListPrec :: ReadPrec [CreateRuleGroupResponse]
readPrec :: ReadPrec CreateRuleGroupResponse
$creadPrec :: ReadPrec CreateRuleGroupResponse
readList :: ReadS [CreateRuleGroupResponse]
$creadList :: ReadS [CreateRuleGroupResponse]
readsPrec :: Int -> ReadS CreateRuleGroupResponse
$creadsPrec :: Int -> ReadS CreateRuleGroupResponse
Prelude.Read, Int -> CreateRuleGroupResponse -> ShowS
[CreateRuleGroupResponse] -> ShowS
CreateRuleGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRuleGroupResponse] -> ShowS
$cshowList :: [CreateRuleGroupResponse] -> ShowS
show :: CreateRuleGroupResponse -> String
$cshow :: CreateRuleGroupResponse -> String
showsPrec :: Int -> CreateRuleGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateRuleGroupResponse -> ShowS
Prelude.Show, forall x. Rep CreateRuleGroupResponse x -> CreateRuleGroupResponse
forall x. CreateRuleGroupResponse -> Rep CreateRuleGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRuleGroupResponse x -> CreateRuleGroupResponse
$cfrom :: forall x. CreateRuleGroupResponse -> Rep CreateRuleGroupResponse x
Prelude.Generic)
newCreateRuleGroupResponse ::
Prelude.Int ->
CreateRuleGroupResponse
newCreateRuleGroupResponse :: Int -> CreateRuleGroupResponse
newCreateRuleGroupResponse Int
pHttpStatus_ =
CreateRuleGroupResponse'
{ $sel:summary:CreateRuleGroupResponse' :: Maybe RuleGroupSummary
summary = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateRuleGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createRuleGroupResponse_summary :: Lens.Lens' CreateRuleGroupResponse (Prelude.Maybe RuleGroupSummary)
createRuleGroupResponse_summary :: Lens' CreateRuleGroupResponse (Maybe RuleGroupSummary)
createRuleGroupResponse_summary = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRuleGroupResponse' {Maybe RuleGroupSummary
summary :: Maybe RuleGroupSummary
$sel:summary:CreateRuleGroupResponse' :: CreateRuleGroupResponse -> Maybe RuleGroupSummary
summary} -> Maybe RuleGroupSummary
summary) (\s :: CreateRuleGroupResponse
s@CreateRuleGroupResponse' {} Maybe RuleGroupSummary
a -> CreateRuleGroupResponse
s {$sel:summary:CreateRuleGroupResponse' :: Maybe RuleGroupSummary
summary = Maybe RuleGroupSummary
a} :: CreateRuleGroupResponse)
createRuleGroupResponse_httpStatus :: Lens.Lens' CreateRuleGroupResponse Prelude.Int
createRuleGroupResponse_httpStatus :: Lens' CreateRuleGroupResponse Int
createRuleGroupResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRuleGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateRuleGroupResponse' :: CreateRuleGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateRuleGroupResponse
s@CreateRuleGroupResponse' {} Int
a -> CreateRuleGroupResponse
s {$sel:httpStatus:CreateRuleGroupResponse' :: Int
httpStatus = Int
a} :: CreateRuleGroupResponse)
instance Prelude.NFData CreateRuleGroupResponse where
rnf :: CreateRuleGroupResponse -> ()
rnf CreateRuleGroupResponse' {Int
Maybe RuleGroupSummary
httpStatus :: Int
summary :: Maybe RuleGroupSummary
$sel:httpStatus:CreateRuleGroupResponse' :: CreateRuleGroupResponse -> Int
$sel:summary:CreateRuleGroupResponse' :: CreateRuleGroupResponse -> Maybe RuleGroupSummary
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe RuleGroupSummary
summary
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus