{-# 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.CreateFirewallPolicy
(
CreateFirewallPolicy (..),
newCreateFirewallPolicy,
createFirewallPolicy_description,
createFirewallPolicy_dryRun,
createFirewallPolicy_tags,
createFirewallPolicy_firewallPolicyName,
createFirewallPolicy_firewallPolicy,
CreateFirewallPolicyResponse (..),
newCreateFirewallPolicyResponse,
createFirewallPolicyResponse_httpStatus,
createFirewallPolicyResponse_updateToken,
createFirewallPolicyResponse_firewallPolicyResponse,
)
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 CreateFirewallPolicy = CreateFirewallPolicy'
{
CreateFirewallPolicy -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateFirewallPolicy -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
CreateFirewallPolicy -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
CreateFirewallPolicy -> Text
firewallPolicyName :: Prelude.Text,
CreateFirewallPolicy -> FirewallPolicy
firewallPolicy :: FirewallPolicy
}
deriving (CreateFirewallPolicy -> CreateFirewallPolicy -> Bool
(CreateFirewallPolicy -> CreateFirewallPolicy -> Bool)
-> (CreateFirewallPolicy -> CreateFirewallPolicy -> Bool)
-> Eq CreateFirewallPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFirewallPolicy -> CreateFirewallPolicy -> Bool
$c/= :: CreateFirewallPolicy -> CreateFirewallPolicy -> Bool
== :: CreateFirewallPolicy -> CreateFirewallPolicy -> Bool
$c== :: CreateFirewallPolicy -> CreateFirewallPolicy -> Bool
Prelude.Eq, ReadPrec [CreateFirewallPolicy]
ReadPrec CreateFirewallPolicy
Int -> ReadS CreateFirewallPolicy
ReadS [CreateFirewallPolicy]
(Int -> ReadS CreateFirewallPolicy)
-> ReadS [CreateFirewallPolicy]
-> ReadPrec CreateFirewallPolicy
-> ReadPrec [CreateFirewallPolicy]
-> Read CreateFirewallPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFirewallPolicy]
$creadListPrec :: ReadPrec [CreateFirewallPolicy]
readPrec :: ReadPrec CreateFirewallPolicy
$creadPrec :: ReadPrec CreateFirewallPolicy
readList :: ReadS [CreateFirewallPolicy]
$creadList :: ReadS [CreateFirewallPolicy]
readsPrec :: Int -> ReadS CreateFirewallPolicy
$creadsPrec :: Int -> ReadS CreateFirewallPolicy
Prelude.Read, Int -> CreateFirewallPolicy -> ShowS
[CreateFirewallPolicy] -> ShowS
CreateFirewallPolicy -> String
(Int -> CreateFirewallPolicy -> ShowS)
-> (CreateFirewallPolicy -> String)
-> ([CreateFirewallPolicy] -> ShowS)
-> Show CreateFirewallPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFirewallPolicy] -> ShowS
$cshowList :: [CreateFirewallPolicy] -> ShowS
show :: CreateFirewallPolicy -> String
$cshow :: CreateFirewallPolicy -> String
showsPrec :: Int -> CreateFirewallPolicy -> ShowS
$cshowsPrec :: Int -> CreateFirewallPolicy -> ShowS
Prelude.Show, (forall x. CreateFirewallPolicy -> Rep CreateFirewallPolicy x)
-> (forall x. Rep CreateFirewallPolicy x -> CreateFirewallPolicy)
-> Generic CreateFirewallPolicy
forall x. Rep CreateFirewallPolicy x -> CreateFirewallPolicy
forall x. CreateFirewallPolicy -> Rep CreateFirewallPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFirewallPolicy x -> CreateFirewallPolicy
$cfrom :: forall x. CreateFirewallPolicy -> Rep CreateFirewallPolicy x
Prelude.Generic)
newCreateFirewallPolicy ::
Prelude.Text ->
FirewallPolicy ->
CreateFirewallPolicy
newCreateFirewallPolicy :: Text -> FirewallPolicy -> CreateFirewallPolicy
newCreateFirewallPolicy
Text
pFirewallPolicyName_
FirewallPolicy
pFirewallPolicy_ =
CreateFirewallPolicy' :: Maybe Text
-> Maybe Bool
-> Maybe (NonEmpty Tag)
-> Text
-> FirewallPolicy
-> CreateFirewallPolicy
CreateFirewallPolicy'
{ $sel:description:CreateFirewallPolicy' :: Maybe Text
description =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dryRun:CreateFirewallPolicy' :: Maybe Bool
dryRun = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateFirewallPolicy' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
$sel:firewallPolicyName:CreateFirewallPolicy' :: Text
firewallPolicyName = Text
pFirewallPolicyName_,
$sel:firewallPolicy:CreateFirewallPolicy' :: FirewallPolicy
firewallPolicy = FirewallPolicy
pFirewallPolicy_
}
createFirewallPolicy_description :: Lens.Lens' CreateFirewallPolicy (Prelude.Maybe Prelude.Text)
createFirewallPolicy_description :: (Maybe Text -> f (Maybe Text))
-> CreateFirewallPolicy -> f CreateFirewallPolicy
createFirewallPolicy_description = (CreateFirewallPolicy -> Maybe Text)
-> (CreateFirewallPolicy -> Maybe Text -> CreateFirewallPolicy)
-> Lens
CreateFirewallPolicy CreateFirewallPolicy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallPolicy' {Maybe Text
description :: Maybe Text
$sel:description:CreateFirewallPolicy' :: CreateFirewallPolicy -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateFirewallPolicy
s@CreateFirewallPolicy' {} Maybe Text
a -> CreateFirewallPolicy
s {$sel:description:CreateFirewallPolicy' :: Maybe Text
description = Maybe Text
a} :: CreateFirewallPolicy)
createFirewallPolicy_dryRun :: Lens.Lens' CreateFirewallPolicy (Prelude.Maybe Prelude.Bool)
createFirewallPolicy_dryRun :: (Maybe Bool -> f (Maybe Bool))
-> CreateFirewallPolicy -> f CreateFirewallPolicy
createFirewallPolicy_dryRun = (CreateFirewallPolicy -> Maybe Bool)
-> (CreateFirewallPolicy -> Maybe Bool -> CreateFirewallPolicy)
-> Lens
CreateFirewallPolicy CreateFirewallPolicy (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallPolicy' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:CreateFirewallPolicy' :: CreateFirewallPolicy -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: CreateFirewallPolicy
s@CreateFirewallPolicy' {} Maybe Bool
a -> CreateFirewallPolicy
s {$sel:dryRun:CreateFirewallPolicy' :: Maybe Bool
dryRun = Maybe Bool
a} :: CreateFirewallPolicy)
createFirewallPolicy_tags :: Lens.Lens' CreateFirewallPolicy (Prelude.Maybe (Prelude.NonEmpty Tag))
createFirewallPolicy_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateFirewallPolicy -> f CreateFirewallPolicy
createFirewallPolicy_tags = (CreateFirewallPolicy -> Maybe (NonEmpty Tag))
-> (CreateFirewallPolicy
-> Maybe (NonEmpty Tag) -> CreateFirewallPolicy)
-> Lens
CreateFirewallPolicy
CreateFirewallPolicy
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallPolicy' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateFirewallPolicy' :: CreateFirewallPolicy -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateFirewallPolicy
s@CreateFirewallPolicy' {} Maybe (NonEmpty Tag)
a -> CreateFirewallPolicy
s {$sel:tags:CreateFirewallPolicy' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateFirewallPolicy) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateFirewallPolicy -> f CreateFirewallPolicy)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateFirewallPolicy
-> f CreateFirewallPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
-> Iso
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
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 (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFirewallPolicy_firewallPolicyName :: Lens.Lens' CreateFirewallPolicy Prelude.Text
createFirewallPolicy_firewallPolicyName :: (Text -> f Text) -> CreateFirewallPolicy -> f CreateFirewallPolicy
createFirewallPolicy_firewallPolicyName = (CreateFirewallPolicy -> Text)
-> (CreateFirewallPolicy -> Text -> CreateFirewallPolicy)
-> Lens CreateFirewallPolicy CreateFirewallPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallPolicy' {Text
firewallPolicyName :: Text
$sel:firewallPolicyName:CreateFirewallPolicy' :: CreateFirewallPolicy -> Text
firewallPolicyName} -> Text
firewallPolicyName) (\s :: CreateFirewallPolicy
s@CreateFirewallPolicy' {} Text
a -> CreateFirewallPolicy
s {$sel:firewallPolicyName:CreateFirewallPolicy' :: Text
firewallPolicyName = Text
a} :: CreateFirewallPolicy)
createFirewallPolicy_firewallPolicy :: Lens.Lens' CreateFirewallPolicy FirewallPolicy
createFirewallPolicy_firewallPolicy :: (FirewallPolicy -> f FirewallPolicy)
-> CreateFirewallPolicy -> f CreateFirewallPolicy
createFirewallPolicy_firewallPolicy = (CreateFirewallPolicy -> FirewallPolicy)
-> (CreateFirewallPolicy -> FirewallPolicy -> CreateFirewallPolicy)
-> Lens
CreateFirewallPolicy
CreateFirewallPolicy
FirewallPolicy
FirewallPolicy
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallPolicy' {FirewallPolicy
firewallPolicy :: FirewallPolicy
$sel:firewallPolicy:CreateFirewallPolicy' :: CreateFirewallPolicy -> FirewallPolicy
firewallPolicy} -> FirewallPolicy
firewallPolicy) (\s :: CreateFirewallPolicy
s@CreateFirewallPolicy' {} FirewallPolicy
a -> CreateFirewallPolicy
s {$sel:firewallPolicy:CreateFirewallPolicy' :: FirewallPolicy
firewallPolicy = FirewallPolicy
a} :: CreateFirewallPolicy)
instance Core.AWSRequest CreateFirewallPolicy where
type
AWSResponse CreateFirewallPolicy =
CreateFirewallPolicyResponse
request :: CreateFirewallPolicy -> Request CreateFirewallPolicy
request = Service -> CreateFirewallPolicy -> Request CreateFirewallPolicy
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateFirewallPolicy
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateFirewallPolicy)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateFirewallPolicy))
-> Logger
-> Service
-> Proxy CreateFirewallPolicy
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateFirewallPolicy)))
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 -> FirewallPolicyResponse -> CreateFirewallPolicyResponse
CreateFirewallPolicyResponse'
(Int
-> Text -> FirewallPolicyResponse -> CreateFirewallPolicyResponse)
-> Either String Int
-> Either
String
(Text -> FirewallPolicyResponse -> CreateFirewallPolicyResponse)
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 -> FirewallPolicyResponse -> CreateFirewallPolicyResponse)
-> Either String Text
-> Either
String (FirewallPolicyResponse -> CreateFirewallPolicyResponse)
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 (FirewallPolicyResponse -> CreateFirewallPolicyResponse)
-> Either String FirewallPolicyResponse
-> Either String CreateFirewallPolicyResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String FirewallPolicyResponse
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"FirewallPolicyResponse")
)
instance Prelude.Hashable CreateFirewallPolicy
instance Prelude.NFData CreateFirewallPolicy
instance Core.ToHeaders CreateFirewallPolicy where
toHeaders :: CreateFirewallPolicy -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateFirewallPolicy -> 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.CreateFirewallPolicy" ::
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 CreateFirewallPolicy where
toJSON :: CreateFirewallPolicy -> Value
toJSON CreateFirewallPolicy' {Maybe Bool
Maybe (NonEmpty Tag)
Maybe Text
Text
FirewallPolicy
firewallPolicy :: FirewallPolicy
firewallPolicyName :: Text
tags :: Maybe (NonEmpty Tag)
dryRun :: Maybe Bool
description :: Maybe Text
$sel:firewallPolicy:CreateFirewallPolicy' :: CreateFirewallPolicy -> FirewallPolicy
$sel:firewallPolicyName:CreateFirewallPolicy' :: CreateFirewallPolicy -> Text
$sel:tags:CreateFirewallPolicy' :: CreateFirewallPolicy -> Maybe (NonEmpty Tag)
$sel:dryRun:CreateFirewallPolicy' :: CreateFirewallPolicy -> Maybe Bool
$sel:description:CreateFirewallPolicy' :: CreateFirewallPolicy -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"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
"Tags" Text -> NonEmpty Tag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Tag -> Pair) -> Maybe (NonEmpty Tag) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Tag)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"FirewallPolicyName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
firewallPolicyName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"FirewallPolicy" Text -> FirewallPolicy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= FirewallPolicy
firewallPolicy)
]
)
instance Core.ToPath CreateFirewallPolicy where
toPath :: CreateFirewallPolicy -> ByteString
toPath = ByteString -> CreateFirewallPolicy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateFirewallPolicy where
toQuery :: CreateFirewallPolicy -> QueryString
toQuery = QueryString -> CreateFirewallPolicy -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateFirewallPolicyResponse = CreateFirewallPolicyResponse'
{
CreateFirewallPolicyResponse -> Int
httpStatus :: Prelude.Int,
CreateFirewallPolicyResponse -> Text
updateToken :: Prelude.Text,
CreateFirewallPolicyResponse -> FirewallPolicyResponse
firewallPolicyResponse :: FirewallPolicyResponse
}
deriving (CreateFirewallPolicyResponse
-> CreateFirewallPolicyResponse -> Bool
(CreateFirewallPolicyResponse
-> CreateFirewallPolicyResponse -> Bool)
-> (CreateFirewallPolicyResponse
-> CreateFirewallPolicyResponse -> Bool)
-> Eq CreateFirewallPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFirewallPolicyResponse
-> CreateFirewallPolicyResponse -> Bool
$c/= :: CreateFirewallPolicyResponse
-> CreateFirewallPolicyResponse -> Bool
== :: CreateFirewallPolicyResponse
-> CreateFirewallPolicyResponse -> Bool
$c== :: CreateFirewallPolicyResponse
-> CreateFirewallPolicyResponse -> Bool
Prelude.Eq, ReadPrec [CreateFirewallPolicyResponse]
ReadPrec CreateFirewallPolicyResponse
Int -> ReadS CreateFirewallPolicyResponse
ReadS [CreateFirewallPolicyResponse]
(Int -> ReadS CreateFirewallPolicyResponse)
-> ReadS [CreateFirewallPolicyResponse]
-> ReadPrec CreateFirewallPolicyResponse
-> ReadPrec [CreateFirewallPolicyResponse]
-> Read CreateFirewallPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFirewallPolicyResponse]
$creadListPrec :: ReadPrec [CreateFirewallPolicyResponse]
readPrec :: ReadPrec CreateFirewallPolicyResponse
$creadPrec :: ReadPrec CreateFirewallPolicyResponse
readList :: ReadS [CreateFirewallPolicyResponse]
$creadList :: ReadS [CreateFirewallPolicyResponse]
readsPrec :: Int -> ReadS CreateFirewallPolicyResponse
$creadsPrec :: Int -> ReadS CreateFirewallPolicyResponse
Prelude.Read, Int -> CreateFirewallPolicyResponse -> ShowS
[CreateFirewallPolicyResponse] -> ShowS
CreateFirewallPolicyResponse -> String
(Int -> CreateFirewallPolicyResponse -> ShowS)
-> (CreateFirewallPolicyResponse -> String)
-> ([CreateFirewallPolicyResponse] -> ShowS)
-> Show CreateFirewallPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFirewallPolicyResponse] -> ShowS
$cshowList :: [CreateFirewallPolicyResponse] -> ShowS
show :: CreateFirewallPolicyResponse -> String
$cshow :: CreateFirewallPolicyResponse -> String
showsPrec :: Int -> CreateFirewallPolicyResponse -> ShowS
$cshowsPrec :: Int -> CreateFirewallPolicyResponse -> ShowS
Prelude.Show, (forall x.
CreateFirewallPolicyResponse -> Rep CreateFirewallPolicyResponse x)
-> (forall x.
Rep CreateFirewallPolicyResponse x -> CreateFirewallPolicyResponse)
-> Generic CreateFirewallPolicyResponse
forall x.
Rep CreateFirewallPolicyResponse x -> CreateFirewallPolicyResponse
forall x.
CreateFirewallPolicyResponse -> Rep CreateFirewallPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateFirewallPolicyResponse x -> CreateFirewallPolicyResponse
$cfrom :: forall x.
CreateFirewallPolicyResponse -> Rep CreateFirewallPolicyResponse x
Prelude.Generic)
newCreateFirewallPolicyResponse ::
Prelude.Int ->
Prelude.Text ->
FirewallPolicyResponse ->
CreateFirewallPolicyResponse
newCreateFirewallPolicyResponse :: Int
-> Text -> FirewallPolicyResponse -> CreateFirewallPolicyResponse
newCreateFirewallPolicyResponse
Int
pHttpStatus_
Text
pUpdateToken_
FirewallPolicyResponse
pFirewallPolicyResponse_ =
CreateFirewallPolicyResponse' :: Int
-> Text -> FirewallPolicyResponse -> CreateFirewallPolicyResponse
CreateFirewallPolicyResponse'
{ $sel:httpStatus:CreateFirewallPolicyResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:updateToken:CreateFirewallPolicyResponse' :: Text
updateToken = Text
pUpdateToken_,
$sel:firewallPolicyResponse:CreateFirewallPolicyResponse' :: FirewallPolicyResponse
firewallPolicyResponse =
FirewallPolicyResponse
pFirewallPolicyResponse_
}
createFirewallPolicyResponse_httpStatus :: Lens.Lens' CreateFirewallPolicyResponse Prelude.Int
createFirewallPolicyResponse_httpStatus :: (Int -> f Int)
-> CreateFirewallPolicyResponse -> f CreateFirewallPolicyResponse
createFirewallPolicyResponse_httpStatus = (CreateFirewallPolicyResponse -> Int)
-> (CreateFirewallPolicyResponse
-> Int -> CreateFirewallPolicyResponse)
-> Lens
CreateFirewallPolicyResponse CreateFirewallPolicyResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateFirewallPolicyResponse' :: CreateFirewallPolicyResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateFirewallPolicyResponse
s@CreateFirewallPolicyResponse' {} Int
a -> CreateFirewallPolicyResponse
s {$sel:httpStatus:CreateFirewallPolicyResponse' :: Int
httpStatus = Int
a} :: CreateFirewallPolicyResponse)
createFirewallPolicyResponse_updateToken :: Lens.Lens' CreateFirewallPolicyResponse Prelude.Text
createFirewallPolicyResponse_updateToken :: (Text -> f Text)
-> CreateFirewallPolicyResponse -> f CreateFirewallPolicyResponse
createFirewallPolicyResponse_updateToken = (CreateFirewallPolicyResponse -> Text)
-> (CreateFirewallPolicyResponse
-> Text -> CreateFirewallPolicyResponse)
-> Lens
CreateFirewallPolicyResponse CreateFirewallPolicyResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallPolicyResponse' {Text
updateToken :: Text
$sel:updateToken:CreateFirewallPolicyResponse' :: CreateFirewallPolicyResponse -> Text
updateToken} -> Text
updateToken) (\s :: CreateFirewallPolicyResponse
s@CreateFirewallPolicyResponse' {} Text
a -> CreateFirewallPolicyResponse
s {$sel:updateToken:CreateFirewallPolicyResponse' :: Text
updateToken = Text
a} :: CreateFirewallPolicyResponse)
createFirewallPolicyResponse_firewallPolicyResponse :: Lens.Lens' CreateFirewallPolicyResponse FirewallPolicyResponse
createFirewallPolicyResponse_firewallPolicyResponse :: (FirewallPolicyResponse -> f FirewallPolicyResponse)
-> CreateFirewallPolicyResponse -> f CreateFirewallPolicyResponse
createFirewallPolicyResponse_firewallPolicyResponse = (CreateFirewallPolicyResponse -> FirewallPolicyResponse)
-> (CreateFirewallPolicyResponse
-> FirewallPolicyResponse -> CreateFirewallPolicyResponse)
-> Lens
CreateFirewallPolicyResponse
CreateFirewallPolicyResponse
FirewallPolicyResponse
FirewallPolicyResponse
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallPolicyResponse' {FirewallPolicyResponse
firewallPolicyResponse :: FirewallPolicyResponse
$sel:firewallPolicyResponse:CreateFirewallPolicyResponse' :: CreateFirewallPolicyResponse -> FirewallPolicyResponse
firewallPolicyResponse} -> FirewallPolicyResponse
firewallPolicyResponse) (\s :: CreateFirewallPolicyResponse
s@CreateFirewallPolicyResponse' {} FirewallPolicyResponse
a -> CreateFirewallPolicyResponse
s {$sel:firewallPolicyResponse:CreateFirewallPolicyResponse' :: FirewallPolicyResponse
firewallPolicyResponse = FirewallPolicyResponse
a} :: CreateFirewallPolicyResponse)
instance Prelude.NFData CreateFirewallPolicyResponse