{-# 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.NetworkFirewall.UpdateRuleGroup
(
UpdateRuleGroup (..),
newUpdateRuleGroup,
updateRuleGroup_ruleGroupArn,
updateRuleGroup_rules,
updateRuleGroup_type,
updateRuleGroup_description,
updateRuleGroup_ruleGroupName,
updateRuleGroup_dryRun,
updateRuleGroup_ruleGroup,
updateRuleGroup_updateToken,
UpdateRuleGroupResponse (..),
newUpdateRuleGroupResponse,
updateRuleGroupResponse_httpStatus,
updateRuleGroupResponse_updateToken,
updateRuleGroupResponse_ruleGroupResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.NetworkFirewall.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateRuleGroup = UpdateRuleGroup'
{
UpdateRuleGroup -> Maybe Text
ruleGroupArn :: Prelude.Maybe Prelude.Text,
UpdateRuleGroup -> Maybe Text
rules :: Prelude.Maybe Prelude.Text,
UpdateRuleGroup -> Maybe RuleGroupType
type' :: Prelude.Maybe RuleGroupType,
UpdateRuleGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateRuleGroup -> Maybe Text
ruleGroupName :: Prelude.Maybe Prelude.Text,
UpdateRuleGroup -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
UpdateRuleGroup -> Maybe RuleGroup
ruleGroup :: Prelude.Maybe RuleGroup,
UpdateRuleGroup -> Text
updateToken :: Prelude.Text
}
deriving (UpdateRuleGroup -> UpdateRuleGroup -> Bool
(UpdateRuleGroup -> UpdateRuleGroup -> Bool)
-> (UpdateRuleGroup -> UpdateRuleGroup -> Bool)
-> Eq UpdateRuleGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRuleGroup -> UpdateRuleGroup -> Bool
$c/= :: UpdateRuleGroup -> UpdateRuleGroup -> Bool
== :: UpdateRuleGroup -> UpdateRuleGroup -> Bool
$c== :: UpdateRuleGroup -> UpdateRuleGroup -> Bool
Prelude.Eq, ReadPrec [UpdateRuleGroup]
ReadPrec UpdateRuleGroup
Int -> ReadS UpdateRuleGroup
ReadS [UpdateRuleGroup]
(Int -> ReadS UpdateRuleGroup)
-> ReadS [UpdateRuleGroup]
-> ReadPrec UpdateRuleGroup
-> ReadPrec [UpdateRuleGroup]
-> Read UpdateRuleGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRuleGroup]
$creadListPrec :: ReadPrec [UpdateRuleGroup]
readPrec :: ReadPrec UpdateRuleGroup
$creadPrec :: ReadPrec UpdateRuleGroup
readList :: ReadS [UpdateRuleGroup]
$creadList :: ReadS [UpdateRuleGroup]
readsPrec :: Int -> ReadS UpdateRuleGroup
$creadsPrec :: Int -> ReadS UpdateRuleGroup
Prelude.Read, Int -> UpdateRuleGroup -> ShowS
[UpdateRuleGroup] -> ShowS
UpdateRuleGroup -> String
(Int -> UpdateRuleGroup -> ShowS)
-> (UpdateRuleGroup -> String)
-> ([UpdateRuleGroup] -> ShowS)
-> Show UpdateRuleGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRuleGroup] -> ShowS
$cshowList :: [UpdateRuleGroup] -> ShowS
show :: UpdateRuleGroup -> String
$cshow :: UpdateRuleGroup -> String
showsPrec :: Int -> UpdateRuleGroup -> ShowS
$cshowsPrec :: Int -> UpdateRuleGroup -> ShowS
Prelude.Show, (forall x. UpdateRuleGroup -> Rep UpdateRuleGroup x)
-> (forall x. Rep UpdateRuleGroup x -> UpdateRuleGroup)
-> Generic UpdateRuleGroup
forall x. Rep UpdateRuleGroup x -> UpdateRuleGroup
forall x. UpdateRuleGroup -> Rep UpdateRuleGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateRuleGroup x -> UpdateRuleGroup
$cfrom :: forall x. UpdateRuleGroup -> Rep UpdateRuleGroup x
Prelude.Generic)
newUpdateRuleGroup ::
Prelude.Text ->
UpdateRuleGroup
newUpdateRuleGroup :: Text -> UpdateRuleGroup
newUpdateRuleGroup Text
pUpdateToken_ =
UpdateRuleGroup' :: Maybe Text
-> Maybe Text
-> Maybe RuleGroupType
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe RuleGroup
-> Text
-> UpdateRuleGroup
UpdateRuleGroup'
{ $sel:ruleGroupArn:UpdateRuleGroup' :: Maybe Text
ruleGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rules:UpdateRuleGroup' :: Maybe Text
rules = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':UpdateRuleGroup' :: Maybe RuleGroupType
type' = Maybe RuleGroupType
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateRuleGroup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ruleGroupName:UpdateRuleGroup' :: Maybe Text
ruleGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dryRun:UpdateRuleGroup' :: Maybe Bool
dryRun = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:ruleGroup:UpdateRuleGroup' :: Maybe RuleGroup
ruleGroup = Maybe RuleGroup
forall a. Maybe a
Prelude.Nothing,
$sel:updateToken:UpdateRuleGroup' :: Text
updateToken = Text
pUpdateToken_
}
updateRuleGroup_ruleGroupArn :: Lens.Lens' UpdateRuleGroup (Prelude.Maybe Prelude.Text)
updateRuleGroup_ruleGroupArn :: (Maybe Text -> f (Maybe Text))
-> UpdateRuleGroup -> f UpdateRuleGroup
updateRuleGroup_ruleGroupArn = (UpdateRuleGroup -> Maybe Text)
-> (UpdateRuleGroup -> Maybe Text -> UpdateRuleGroup)
-> Lens UpdateRuleGroup UpdateRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroup' {Maybe Text
ruleGroupArn :: Maybe Text
$sel:ruleGroupArn:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe Text
ruleGroupArn} -> Maybe Text
ruleGroupArn) (\s :: UpdateRuleGroup
s@UpdateRuleGroup' {} Maybe Text
a -> UpdateRuleGroup
s {$sel:ruleGroupArn:UpdateRuleGroup' :: Maybe Text
ruleGroupArn = Maybe Text
a} :: UpdateRuleGroup)
updateRuleGroup_rules :: Lens.Lens' UpdateRuleGroup (Prelude.Maybe Prelude.Text)
updateRuleGroup_rules :: (Maybe Text -> f (Maybe Text))
-> UpdateRuleGroup -> f UpdateRuleGroup
updateRuleGroup_rules = (UpdateRuleGroup -> Maybe Text)
-> (UpdateRuleGroup -> Maybe Text -> UpdateRuleGroup)
-> Lens UpdateRuleGroup UpdateRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroup' {Maybe Text
rules :: Maybe Text
$sel:rules:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe Text
rules} -> Maybe Text
rules) (\s :: UpdateRuleGroup
s@UpdateRuleGroup' {} Maybe Text
a -> UpdateRuleGroup
s {$sel:rules:UpdateRuleGroup' :: Maybe Text
rules = Maybe Text
a} :: UpdateRuleGroup)
updateRuleGroup_type :: Lens.Lens' UpdateRuleGroup (Prelude.Maybe RuleGroupType)
updateRuleGroup_type :: (Maybe RuleGroupType -> f (Maybe RuleGroupType))
-> UpdateRuleGroup -> f UpdateRuleGroup
updateRuleGroup_type = (UpdateRuleGroup -> Maybe RuleGroupType)
-> (UpdateRuleGroup -> Maybe RuleGroupType -> UpdateRuleGroup)
-> Lens
UpdateRuleGroup
UpdateRuleGroup
(Maybe RuleGroupType)
(Maybe RuleGroupType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroup' {Maybe RuleGroupType
type' :: Maybe RuleGroupType
$sel:type':UpdateRuleGroup' :: UpdateRuleGroup -> Maybe RuleGroupType
type'} -> Maybe RuleGroupType
type') (\s :: UpdateRuleGroup
s@UpdateRuleGroup' {} Maybe RuleGroupType
a -> UpdateRuleGroup
s {$sel:type':UpdateRuleGroup' :: Maybe RuleGroupType
type' = Maybe RuleGroupType
a} :: UpdateRuleGroup)
updateRuleGroup_description :: Lens.Lens' UpdateRuleGroup (Prelude.Maybe Prelude.Text)
updateRuleGroup_description :: (Maybe Text -> f (Maybe Text))
-> UpdateRuleGroup -> f UpdateRuleGroup
updateRuleGroup_description = (UpdateRuleGroup -> Maybe Text)
-> (UpdateRuleGroup -> Maybe Text -> UpdateRuleGroup)
-> Lens UpdateRuleGroup UpdateRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroup' {Maybe Text
description :: Maybe Text
$sel:description:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateRuleGroup
s@UpdateRuleGroup' {} Maybe Text
a -> UpdateRuleGroup
s {$sel:description:UpdateRuleGroup' :: Maybe Text
description = Maybe Text
a} :: UpdateRuleGroup)
updateRuleGroup_ruleGroupName :: Lens.Lens' UpdateRuleGroup (Prelude.Maybe Prelude.Text)
updateRuleGroup_ruleGroupName :: (Maybe Text -> f (Maybe Text))
-> UpdateRuleGroup -> f UpdateRuleGroup
updateRuleGroup_ruleGroupName = (UpdateRuleGroup -> Maybe Text)
-> (UpdateRuleGroup -> Maybe Text -> UpdateRuleGroup)
-> Lens UpdateRuleGroup UpdateRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroup' {Maybe Text
ruleGroupName :: Maybe Text
$sel:ruleGroupName:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe Text
ruleGroupName} -> Maybe Text
ruleGroupName) (\s :: UpdateRuleGroup
s@UpdateRuleGroup' {} Maybe Text
a -> UpdateRuleGroup
s {$sel:ruleGroupName:UpdateRuleGroup' :: Maybe Text
ruleGroupName = Maybe Text
a} :: UpdateRuleGroup)
updateRuleGroup_dryRun :: Lens.Lens' UpdateRuleGroup (Prelude.Maybe Prelude.Bool)
updateRuleGroup_dryRun :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRuleGroup -> f UpdateRuleGroup
updateRuleGroup_dryRun = (UpdateRuleGroup -> Maybe Bool)
-> (UpdateRuleGroup -> Maybe Bool -> UpdateRuleGroup)
-> Lens UpdateRuleGroup UpdateRuleGroup (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroup' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: UpdateRuleGroup
s@UpdateRuleGroup' {} Maybe Bool
a -> UpdateRuleGroup
s {$sel:dryRun:UpdateRuleGroup' :: Maybe Bool
dryRun = Maybe Bool
a} :: UpdateRuleGroup)
updateRuleGroup_ruleGroup :: Lens.Lens' UpdateRuleGroup (Prelude.Maybe RuleGroup)
updateRuleGroup_ruleGroup :: (Maybe RuleGroup -> f (Maybe RuleGroup))
-> UpdateRuleGroup -> f UpdateRuleGroup
updateRuleGroup_ruleGroup = (UpdateRuleGroup -> Maybe RuleGroup)
-> (UpdateRuleGroup -> Maybe RuleGroup -> UpdateRuleGroup)
-> Lens
UpdateRuleGroup UpdateRuleGroup (Maybe RuleGroup) (Maybe RuleGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroup' {Maybe RuleGroup
ruleGroup :: Maybe RuleGroup
$sel:ruleGroup:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe RuleGroup
ruleGroup} -> Maybe RuleGroup
ruleGroup) (\s :: UpdateRuleGroup
s@UpdateRuleGroup' {} Maybe RuleGroup
a -> UpdateRuleGroup
s {$sel:ruleGroup:UpdateRuleGroup' :: Maybe RuleGroup
ruleGroup = Maybe RuleGroup
a} :: UpdateRuleGroup)
updateRuleGroup_updateToken :: Lens.Lens' UpdateRuleGroup Prelude.Text
updateRuleGroup_updateToken :: (Text -> f Text) -> UpdateRuleGroup -> f UpdateRuleGroup
updateRuleGroup_updateToken = (UpdateRuleGroup -> Text)
-> (UpdateRuleGroup -> Text -> UpdateRuleGroup)
-> Lens UpdateRuleGroup UpdateRuleGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroup' {Text
updateToken :: Text
$sel:updateToken:UpdateRuleGroup' :: UpdateRuleGroup -> Text
updateToken} -> Text
updateToken) (\s :: UpdateRuleGroup
s@UpdateRuleGroup' {} Text
a -> UpdateRuleGroup
s {$sel:updateToken:UpdateRuleGroup' :: Text
updateToken = Text
a} :: UpdateRuleGroup)
instance Core.AWSRequest UpdateRuleGroup where
type
AWSResponse UpdateRuleGroup =
UpdateRuleGroupResponse
request :: UpdateRuleGroup -> Request UpdateRuleGroup
request = Service -> UpdateRuleGroup -> Request UpdateRuleGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateRuleGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateRuleGroup)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateRuleGroup))
-> Logger
-> Service
-> Proxy UpdateRuleGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateRuleGroup)))
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 -> RuleGroupResponse -> UpdateRuleGroupResponse
UpdateRuleGroupResponse'
(Int -> Text -> RuleGroupResponse -> UpdateRuleGroupResponse)
-> Either String Int
-> Either
String (Text -> RuleGroupResponse -> UpdateRuleGroupResponse)
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 -> RuleGroupResponse -> UpdateRuleGroupResponse)
-> Either String Text
-> Either String (RuleGroupResponse -> UpdateRuleGroupResponse)
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
"UpdateToken")
Either String (RuleGroupResponse -> UpdateRuleGroupResponse)
-> Either String RuleGroupResponse
-> Either String UpdateRuleGroupResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String RuleGroupResponse
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"RuleGroupResponse")
)
instance Prelude.Hashable UpdateRuleGroup
instance Prelude.NFData UpdateRuleGroup
instance Core.ToHeaders UpdateRuleGroup where
toHeaders :: UpdateRuleGroup -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateRuleGroup -> 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
"NetworkFirewall_20201112.UpdateRuleGroup" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateRuleGroup where
toJSON :: UpdateRuleGroup -> Value
toJSON UpdateRuleGroup' {Maybe Bool
Maybe Text
Maybe RuleGroupType
Maybe RuleGroup
Text
updateToken :: Text
ruleGroup :: Maybe RuleGroup
dryRun :: Maybe Bool
ruleGroupName :: Maybe Text
description :: Maybe Text
type' :: Maybe RuleGroupType
rules :: Maybe Text
ruleGroupArn :: Maybe Text
$sel:updateToken:UpdateRuleGroup' :: UpdateRuleGroup -> Text
$sel:ruleGroup:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe RuleGroup
$sel:dryRun:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe Bool
$sel:ruleGroupName:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe Text
$sel:description:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe Text
$sel:type':UpdateRuleGroup' :: UpdateRuleGroup -> Maybe RuleGroupType
$sel:rules:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe Text
$sel:ruleGroupArn:UpdateRuleGroup' :: UpdateRuleGroup -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"RuleGroupArn" 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
ruleGroupArn,
(Text
"Rules" 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
rules,
(Text
"Type" Text -> RuleGroupType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RuleGroupType -> Pair) -> Maybe RuleGroupType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RuleGroupType
type',
(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
"RuleGroupName" 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
ruleGroupName,
(Text
"DryRun" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dryRun,
(Text
"RuleGroup" Text -> RuleGroup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RuleGroup -> Pair) -> Maybe RuleGroup -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RuleGroup
ruleGroup,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"UpdateToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
updateToken)
]
)
instance Core.ToPath UpdateRuleGroup where
toPath :: UpdateRuleGroup -> ByteString
toPath = ByteString -> UpdateRuleGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateRuleGroup where
toQuery :: UpdateRuleGroup -> QueryString
toQuery = QueryString -> UpdateRuleGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateRuleGroupResponse = UpdateRuleGroupResponse'
{
UpdateRuleGroupResponse -> Int
httpStatus :: Prelude.Int,
UpdateRuleGroupResponse -> Text
updateToken :: Prelude.Text,
UpdateRuleGroupResponse -> RuleGroupResponse
ruleGroupResponse :: RuleGroupResponse
}
deriving (UpdateRuleGroupResponse -> UpdateRuleGroupResponse -> Bool
(UpdateRuleGroupResponse -> UpdateRuleGroupResponse -> Bool)
-> (UpdateRuleGroupResponse -> UpdateRuleGroupResponse -> Bool)
-> Eq UpdateRuleGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRuleGroupResponse -> UpdateRuleGroupResponse -> Bool
$c/= :: UpdateRuleGroupResponse -> UpdateRuleGroupResponse -> Bool
== :: UpdateRuleGroupResponse -> UpdateRuleGroupResponse -> Bool
$c== :: UpdateRuleGroupResponse -> UpdateRuleGroupResponse -> Bool
Prelude.Eq, ReadPrec [UpdateRuleGroupResponse]
ReadPrec UpdateRuleGroupResponse
Int -> ReadS UpdateRuleGroupResponse
ReadS [UpdateRuleGroupResponse]
(Int -> ReadS UpdateRuleGroupResponse)
-> ReadS [UpdateRuleGroupResponse]
-> ReadPrec UpdateRuleGroupResponse
-> ReadPrec [UpdateRuleGroupResponse]
-> Read UpdateRuleGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRuleGroupResponse]
$creadListPrec :: ReadPrec [UpdateRuleGroupResponse]
readPrec :: ReadPrec UpdateRuleGroupResponse
$creadPrec :: ReadPrec UpdateRuleGroupResponse
readList :: ReadS [UpdateRuleGroupResponse]
$creadList :: ReadS [UpdateRuleGroupResponse]
readsPrec :: Int -> ReadS UpdateRuleGroupResponse
$creadsPrec :: Int -> ReadS UpdateRuleGroupResponse
Prelude.Read, Int -> UpdateRuleGroupResponse -> ShowS
[UpdateRuleGroupResponse] -> ShowS
UpdateRuleGroupResponse -> String
(Int -> UpdateRuleGroupResponse -> ShowS)
-> (UpdateRuleGroupResponse -> String)
-> ([UpdateRuleGroupResponse] -> ShowS)
-> Show UpdateRuleGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRuleGroupResponse] -> ShowS
$cshowList :: [UpdateRuleGroupResponse] -> ShowS
show :: UpdateRuleGroupResponse -> String
$cshow :: UpdateRuleGroupResponse -> String
showsPrec :: Int -> UpdateRuleGroupResponse -> ShowS
$cshowsPrec :: Int -> UpdateRuleGroupResponse -> ShowS
Prelude.Show, (forall x.
UpdateRuleGroupResponse -> Rep UpdateRuleGroupResponse x)
-> (forall x.
Rep UpdateRuleGroupResponse x -> UpdateRuleGroupResponse)
-> Generic UpdateRuleGroupResponse
forall x. Rep UpdateRuleGroupResponse x -> UpdateRuleGroupResponse
forall x. UpdateRuleGroupResponse -> Rep UpdateRuleGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateRuleGroupResponse x -> UpdateRuleGroupResponse
$cfrom :: forall x. UpdateRuleGroupResponse -> Rep UpdateRuleGroupResponse x
Prelude.Generic)
newUpdateRuleGroupResponse ::
Prelude.Int ->
Prelude.Text ->
RuleGroupResponse ->
UpdateRuleGroupResponse
newUpdateRuleGroupResponse :: Int -> Text -> RuleGroupResponse -> UpdateRuleGroupResponse
newUpdateRuleGroupResponse
Int
pHttpStatus_
Text
pUpdateToken_
RuleGroupResponse
pRuleGroupResponse_ =
UpdateRuleGroupResponse' :: Int -> Text -> RuleGroupResponse -> UpdateRuleGroupResponse
UpdateRuleGroupResponse'
{ $sel:httpStatus:UpdateRuleGroupResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:updateToken:UpdateRuleGroupResponse' :: Text
updateToken = Text
pUpdateToken_,
$sel:ruleGroupResponse:UpdateRuleGroupResponse' :: RuleGroupResponse
ruleGroupResponse = RuleGroupResponse
pRuleGroupResponse_
}
updateRuleGroupResponse_httpStatus :: Lens.Lens' UpdateRuleGroupResponse Prelude.Int
updateRuleGroupResponse_httpStatus :: (Int -> f Int)
-> UpdateRuleGroupResponse -> f UpdateRuleGroupResponse
updateRuleGroupResponse_httpStatus = (UpdateRuleGroupResponse -> Int)
-> (UpdateRuleGroupResponse -> Int -> UpdateRuleGroupResponse)
-> Lens UpdateRuleGroupResponse UpdateRuleGroupResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateRuleGroupResponse' :: UpdateRuleGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateRuleGroupResponse
s@UpdateRuleGroupResponse' {} Int
a -> UpdateRuleGroupResponse
s {$sel:httpStatus:UpdateRuleGroupResponse' :: Int
httpStatus = Int
a} :: UpdateRuleGroupResponse)
updateRuleGroupResponse_updateToken :: Lens.Lens' UpdateRuleGroupResponse Prelude.Text
updateRuleGroupResponse_updateToken :: (Text -> f Text)
-> UpdateRuleGroupResponse -> f UpdateRuleGroupResponse
updateRuleGroupResponse_updateToken = (UpdateRuleGroupResponse -> Text)
-> (UpdateRuleGroupResponse -> Text -> UpdateRuleGroupResponse)
-> Lens UpdateRuleGroupResponse UpdateRuleGroupResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroupResponse' {Text
updateToken :: Text
$sel:updateToken:UpdateRuleGroupResponse' :: UpdateRuleGroupResponse -> Text
updateToken} -> Text
updateToken) (\s :: UpdateRuleGroupResponse
s@UpdateRuleGroupResponse' {} Text
a -> UpdateRuleGroupResponse
s {$sel:updateToken:UpdateRuleGroupResponse' :: Text
updateToken = Text
a} :: UpdateRuleGroupResponse)
updateRuleGroupResponse_ruleGroupResponse :: Lens.Lens' UpdateRuleGroupResponse RuleGroupResponse
updateRuleGroupResponse_ruleGroupResponse :: (RuleGroupResponse -> f RuleGroupResponse)
-> UpdateRuleGroupResponse -> f UpdateRuleGroupResponse
updateRuleGroupResponse_ruleGroupResponse = (UpdateRuleGroupResponse -> RuleGroupResponse)
-> (UpdateRuleGroupResponse
-> RuleGroupResponse -> UpdateRuleGroupResponse)
-> Lens
UpdateRuleGroupResponse
UpdateRuleGroupResponse
RuleGroupResponse
RuleGroupResponse
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRuleGroupResponse' {RuleGroupResponse
ruleGroupResponse :: RuleGroupResponse
$sel:ruleGroupResponse:UpdateRuleGroupResponse' :: UpdateRuleGroupResponse -> RuleGroupResponse
ruleGroupResponse} -> RuleGroupResponse
ruleGroupResponse) (\s :: UpdateRuleGroupResponse
s@UpdateRuleGroupResponse' {} RuleGroupResponse
a -> UpdateRuleGroupResponse
s {$sel:ruleGroupResponse:UpdateRuleGroupResponse' :: RuleGroupResponse
ruleGroupResponse = RuleGroupResponse
a} :: UpdateRuleGroupResponse)
instance Prelude.NFData UpdateRuleGroupResponse