{-# 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.CreateFirewall
(
CreateFirewall (..),
newCreateFirewall,
createFirewall_firewallPolicyChangeProtection,
createFirewall_subnetChangeProtection,
createFirewall_deleteProtection,
createFirewall_description,
createFirewall_tags,
createFirewall_firewallName,
createFirewall_firewallPolicyArn,
createFirewall_vpcId,
createFirewall_subnetMappings,
CreateFirewallResponse (..),
newCreateFirewallResponse,
createFirewallResponse_firewallStatus,
createFirewallResponse_firewall,
createFirewallResponse_httpStatus,
)
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 CreateFirewall = CreateFirewall'
{
CreateFirewall -> Maybe Bool
firewallPolicyChangeProtection :: Prelude.Maybe Prelude.Bool,
CreateFirewall -> Maybe Bool
subnetChangeProtection :: Prelude.Maybe Prelude.Bool,
CreateFirewall -> Maybe Bool
deleteProtection :: Prelude.Maybe Prelude.Bool,
CreateFirewall -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateFirewall -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
CreateFirewall -> Text
firewallName :: Prelude.Text,
CreateFirewall -> Text
firewallPolicyArn :: Prelude.Text,
CreateFirewall -> Text
vpcId :: Prelude.Text,
CreateFirewall -> [SubnetMapping]
subnetMappings :: [SubnetMapping]
}
deriving (CreateFirewall -> CreateFirewall -> Bool
(CreateFirewall -> CreateFirewall -> Bool)
-> (CreateFirewall -> CreateFirewall -> Bool) -> Eq CreateFirewall
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFirewall -> CreateFirewall -> Bool
$c/= :: CreateFirewall -> CreateFirewall -> Bool
== :: CreateFirewall -> CreateFirewall -> Bool
$c== :: CreateFirewall -> CreateFirewall -> Bool
Prelude.Eq, ReadPrec [CreateFirewall]
ReadPrec CreateFirewall
Int -> ReadS CreateFirewall
ReadS [CreateFirewall]
(Int -> ReadS CreateFirewall)
-> ReadS [CreateFirewall]
-> ReadPrec CreateFirewall
-> ReadPrec [CreateFirewall]
-> Read CreateFirewall
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFirewall]
$creadListPrec :: ReadPrec [CreateFirewall]
readPrec :: ReadPrec CreateFirewall
$creadPrec :: ReadPrec CreateFirewall
readList :: ReadS [CreateFirewall]
$creadList :: ReadS [CreateFirewall]
readsPrec :: Int -> ReadS CreateFirewall
$creadsPrec :: Int -> ReadS CreateFirewall
Prelude.Read, Int -> CreateFirewall -> ShowS
[CreateFirewall] -> ShowS
CreateFirewall -> String
(Int -> CreateFirewall -> ShowS)
-> (CreateFirewall -> String)
-> ([CreateFirewall] -> ShowS)
-> Show CreateFirewall
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFirewall] -> ShowS
$cshowList :: [CreateFirewall] -> ShowS
show :: CreateFirewall -> String
$cshow :: CreateFirewall -> String
showsPrec :: Int -> CreateFirewall -> ShowS
$cshowsPrec :: Int -> CreateFirewall -> ShowS
Prelude.Show, (forall x. CreateFirewall -> Rep CreateFirewall x)
-> (forall x. Rep CreateFirewall x -> CreateFirewall)
-> Generic CreateFirewall
forall x. Rep CreateFirewall x -> CreateFirewall
forall x. CreateFirewall -> Rep CreateFirewall x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFirewall x -> CreateFirewall
$cfrom :: forall x. CreateFirewall -> Rep CreateFirewall x
Prelude.Generic)
newCreateFirewall ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateFirewall
newCreateFirewall :: Text -> Text -> Text -> CreateFirewall
newCreateFirewall
Text
pFirewallName_
Text
pFirewallPolicyArn_
Text
pVpcId_ =
CreateFirewall' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> Text
-> Text
-> Text
-> [SubnetMapping]
-> CreateFirewall
CreateFirewall'
{ $sel:firewallPolicyChangeProtection:CreateFirewall' :: Maybe Bool
firewallPolicyChangeProtection =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:subnetChangeProtection:CreateFirewall' :: Maybe Bool
subnetChangeProtection = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:deleteProtection:CreateFirewall' :: Maybe Bool
deleteProtection = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateFirewall' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateFirewall' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
$sel:firewallName:CreateFirewall' :: Text
firewallName = Text
pFirewallName_,
$sel:firewallPolicyArn:CreateFirewall' :: Text
firewallPolicyArn = Text
pFirewallPolicyArn_,
$sel:vpcId:CreateFirewall' :: Text
vpcId = Text
pVpcId_,
$sel:subnetMappings:CreateFirewall' :: [SubnetMapping]
subnetMappings = [SubnetMapping]
forall a. Monoid a => a
Prelude.mempty
}
createFirewall_firewallPolicyChangeProtection :: Lens.Lens' CreateFirewall (Prelude.Maybe Prelude.Bool)
createFirewall_firewallPolicyChangeProtection :: (Maybe Bool -> f (Maybe Bool))
-> CreateFirewall -> f CreateFirewall
createFirewall_firewallPolicyChangeProtection = (CreateFirewall -> Maybe Bool)
-> (CreateFirewall -> Maybe Bool -> CreateFirewall)
-> Lens CreateFirewall CreateFirewall (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewall' {Maybe Bool
firewallPolicyChangeProtection :: Maybe Bool
$sel:firewallPolicyChangeProtection:CreateFirewall' :: CreateFirewall -> Maybe Bool
firewallPolicyChangeProtection} -> Maybe Bool
firewallPolicyChangeProtection) (\s :: CreateFirewall
s@CreateFirewall' {} Maybe Bool
a -> CreateFirewall
s {$sel:firewallPolicyChangeProtection:CreateFirewall' :: Maybe Bool
firewallPolicyChangeProtection = Maybe Bool
a} :: CreateFirewall)
createFirewall_subnetChangeProtection :: Lens.Lens' CreateFirewall (Prelude.Maybe Prelude.Bool)
createFirewall_subnetChangeProtection :: (Maybe Bool -> f (Maybe Bool))
-> CreateFirewall -> f CreateFirewall
createFirewall_subnetChangeProtection = (CreateFirewall -> Maybe Bool)
-> (CreateFirewall -> Maybe Bool -> CreateFirewall)
-> Lens CreateFirewall CreateFirewall (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewall' {Maybe Bool
subnetChangeProtection :: Maybe Bool
$sel:subnetChangeProtection:CreateFirewall' :: CreateFirewall -> Maybe Bool
subnetChangeProtection} -> Maybe Bool
subnetChangeProtection) (\s :: CreateFirewall
s@CreateFirewall' {} Maybe Bool
a -> CreateFirewall
s {$sel:subnetChangeProtection:CreateFirewall' :: Maybe Bool
subnetChangeProtection = Maybe Bool
a} :: CreateFirewall)
createFirewall_deleteProtection :: Lens.Lens' CreateFirewall (Prelude.Maybe Prelude.Bool)
createFirewall_deleteProtection :: (Maybe Bool -> f (Maybe Bool))
-> CreateFirewall -> f CreateFirewall
createFirewall_deleteProtection = (CreateFirewall -> Maybe Bool)
-> (CreateFirewall -> Maybe Bool -> CreateFirewall)
-> Lens CreateFirewall CreateFirewall (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewall' {Maybe Bool
deleteProtection :: Maybe Bool
$sel:deleteProtection:CreateFirewall' :: CreateFirewall -> Maybe Bool
deleteProtection} -> Maybe Bool
deleteProtection) (\s :: CreateFirewall
s@CreateFirewall' {} Maybe Bool
a -> CreateFirewall
s {$sel:deleteProtection:CreateFirewall' :: Maybe Bool
deleteProtection = Maybe Bool
a} :: CreateFirewall)
createFirewall_description :: Lens.Lens' CreateFirewall (Prelude.Maybe Prelude.Text)
createFirewall_description :: (Maybe Text -> f (Maybe Text))
-> CreateFirewall -> f CreateFirewall
createFirewall_description = (CreateFirewall -> Maybe Text)
-> (CreateFirewall -> Maybe Text -> CreateFirewall)
-> Lens CreateFirewall CreateFirewall (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewall' {Maybe Text
description :: Maybe Text
$sel:description:CreateFirewall' :: CreateFirewall -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateFirewall
s@CreateFirewall' {} Maybe Text
a -> CreateFirewall
s {$sel:description:CreateFirewall' :: Maybe Text
description = Maybe Text
a} :: CreateFirewall)
createFirewall_tags :: Lens.Lens' CreateFirewall (Prelude.Maybe (Prelude.NonEmpty Tag))
createFirewall_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateFirewall -> f CreateFirewall
createFirewall_tags = (CreateFirewall -> Maybe (NonEmpty Tag))
-> (CreateFirewall -> Maybe (NonEmpty Tag) -> CreateFirewall)
-> Lens
CreateFirewall
CreateFirewall
(Maybe (NonEmpty Tag))
(Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewall' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:CreateFirewall' :: CreateFirewall -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: CreateFirewall
s@CreateFirewall' {} Maybe (NonEmpty Tag)
a -> CreateFirewall
s {$sel:tags:CreateFirewall' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: CreateFirewall) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateFirewall -> f CreateFirewall)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> CreateFirewall
-> f CreateFirewall
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
createFirewall_firewallName :: Lens.Lens' CreateFirewall Prelude.Text
createFirewall_firewallName :: (Text -> f Text) -> CreateFirewall -> f CreateFirewall
createFirewall_firewallName = (CreateFirewall -> Text)
-> (CreateFirewall -> Text -> CreateFirewall)
-> Lens CreateFirewall CreateFirewall Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewall' {Text
firewallName :: Text
$sel:firewallName:CreateFirewall' :: CreateFirewall -> Text
firewallName} -> Text
firewallName) (\s :: CreateFirewall
s@CreateFirewall' {} Text
a -> CreateFirewall
s {$sel:firewallName:CreateFirewall' :: Text
firewallName = Text
a} :: CreateFirewall)
createFirewall_firewallPolicyArn :: Lens.Lens' CreateFirewall Prelude.Text
createFirewall_firewallPolicyArn :: (Text -> f Text) -> CreateFirewall -> f CreateFirewall
createFirewall_firewallPolicyArn = (CreateFirewall -> Text)
-> (CreateFirewall -> Text -> CreateFirewall)
-> Lens CreateFirewall CreateFirewall Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewall' {Text
firewallPolicyArn :: Text
$sel:firewallPolicyArn:CreateFirewall' :: CreateFirewall -> Text
firewallPolicyArn} -> Text
firewallPolicyArn) (\s :: CreateFirewall
s@CreateFirewall' {} Text
a -> CreateFirewall
s {$sel:firewallPolicyArn:CreateFirewall' :: Text
firewallPolicyArn = Text
a} :: CreateFirewall)
createFirewall_vpcId :: Lens.Lens' CreateFirewall Prelude.Text
createFirewall_vpcId :: (Text -> f Text) -> CreateFirewall -> f CreateFirewall
createFirewall_vpcId = (CreateFirewall -> Text)
-> (CreateFirewall -> Text -> CreateFirewall)
-> Lens CreateFirewall CreateFirewall Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewall' {Text
vpcId :: Text
$sel:vpcId:CreateFirewall' :: CreateFirewall -> Text
vpcId} -> Text
vpcId) (\s :: CreateFirewall
s@CreateFirewall' {} Text
a -> CreateFirewall
s {$sel:vpcId:CreateFirewall' :: Text
vpcId = Text
a} :: CreateFirewall)
createFirewall_subnetMappings :: Lens.Lens' CreateFirewall [SubnetMapping]
createFirewall_subnetMappings :: ([SubnetMapping] -> f [SubnetMapping])
-> CreateFirewall -> f CreateFirewall
createFirewall_subnetMappings = (CreateFirewall -> [SubnetMapping])
-> (CreateFirewall -> [SubnetMapping] -> CreateFirewall)
-> Lens
CreateFirewall CreateFirewall [SubnetMapping] [SubnetMapping]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewall' {[SubnetMapping]
subnetMappings :: [SubnetMapping]
$sel:subnetMappings:CreateFirewall' :: CreateFirewall -> [SubnetMapping]
subnetMappings} -> [SubnetMapping]
subnetMappings) (\s :: CreateFirewall
s@CreateFirewall' {} [SubnetMapping]
a -> CreateFirewall
s {$sel:subnetMappings:CreateFirewall' :: [SubnetMapping]
subnetMappings = [SubnetMapping]
a} :: CreateFirewall) (([SubnetMapping] -> f [SubnetMapping])
-> CreateFirewall -> f CreateFirewall)
-> (([SubnetMapping] -> f [SubnetMapping])
-> [SubnetMapping] -> f [SubnetMapping])
-> ([SubnetMapping] -> f [SubnetMapping])
-> CreateFirewall
-> f CreateFirewall
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([SubnetMapping] -> f [SubnetMapping])
-> [SubnetMapping] -> f [SubnetMapping]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest CreateFirewall where
type
AWSResponse CreateFirewall =
CreateFirewallResponse
request :: CreateFirewall -> Request CreateFirewall
request = Service -> CreateFirewall -> Request CreateFirewall
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateFirewall
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFirewall)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateFirewall))
-> Logger
-> Service
-> Proxy CreateFirewall
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFirewall)))
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 ->
Maybe FirewallStatus
-> Maybe Firewall -> Int -> CreateFirewallResponse
CreateFirewallResponse'
(Maybe FirewallStatus
-> Maybe Firewall -> Int -> CreateFirewallResponse)
-> Either String (Maybe FirewallStatus)
-> Either String (Maybe Firewall -> Int -> CreateFirewallResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe FirewallStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FirewallStatus")
Either String (Maybe Firewall -> Int -> CreateFirewallResponse)
-> Either String (Maybe Firewall)
-> Either String (Int -> CreateFirewallResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Firewall)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Firewall")
Either String (Int -> CreateFirewallResponse)
-> Either String Int -> Either String CreateFirewallResponse
forall (f :: * -> *) a b. Applicative f => 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 CreateFirewall
instance Prelude.NFData CreateFirewall
instance Core.ToHeaders CreateFirewall where
toHeaders :: CreateFirewall -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateFirewall -> 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.CreateFirewall" ::
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 CreateFirewall where
toJSON :: CreateFirewall -> Value
toJSON CreateFirewall' {[SubnetMapping]
Maybe Bool
Maybe (NonEmpty Tag)
Maybe Text
Text
subnetMappings :: [SubnetMapping]
vpcId :: Text
firewallPolicyArn :: Text
firewallName :: Text
tags :: Maybe (NonEmpty Tag)
description :: Maybe Text
deleteProtection :: Maybe Bool
subnetChangeProtection :: Maybe Bool
firewallPolicyChangeProtection :: Maybe Bool
$sel:subnetMappings:CreateFirewall' :: CreateFirewall -> [SubnetMapping]
$sel:vpcId:CreateFirewall' :: CreateFirewall -> Text
$sel:firewallPolicyArn:CreateFirewall' :: CreateFirewall -> Text
$sel:firewallName:CreateFirewall' :: CreateFirewall -> Text
$sel:tags:CreateFirewall' :: CreateFirewall -> Maybe (NonEmpty Tag)
$sel:description:CreateFirewall' :: CreateFirewall -> Maybe Text
$sel:deleteProtection:CreateFirewall' :: CreateFirewall -> Maybe Bool
$sel:subnetChangeProtection:CreateFirewall' :: CreateFirewall -> Maybe Bool
$sel:firewallPolicyChangeProtection:CreateFirewall' :: CreateFirewall -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"FirewallPolicyChangeProtection" 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
firewallPolicyChangeProtection,
(Text
"SubnetChangeProtection" 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
subnetChangeProtection,
(Text
"DeleteProtection" 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
deleteProtection,
(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
"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
"FirewallName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
firewallName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"FirewallPolicyArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
firewallPolicyArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"VpcId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vpcId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"SubnetMappings" Text -> [SubnetMapping] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [SubnetMapping]
subnetMappings)
]
)
instance Core.ToPath CreateFirewall where
toPath :: CreateFirewall -> ByteString
toPath = ByteString -> CreateFirewall -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateFirewall where
toQuery :: CreateFirewall -> QueryString
toQuery = QueryString -> CreateFirewall -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateFirewallResponse = CreateFirewallResponse'
{
CreateFirewallResponse -> Maybe FirewallStatus
firewallStatus :: Prelude.Maybe FirewallStatus,
CreateFirewallResponse -> Maybe Firewall
firewall :: Prelude.Maybe Firewall,
CreateFirewallResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateFirewallResponse -> CreateFirewallResponse -> Bool
(CreateFirewallResponse -> CreateFirewallResponse -> Bool)
-> (CreateFirewallResponse -> CreateFirewallResponse -> Bool)
-> Eq CreateFirewallResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFirewallResponse -> CreateFirewallResponse -> Bool
$c/= :: CreateFirewallResponse -> CreateFirewallResponse -> Bool
== :: CreateFirewallResponse -> CreateFirewallResponse -> Bool
$c== :: CreateFirewallResponse -> CreateFirewallResponse -> Bool
Prelude.Eq, ReadPrec [CreateFirewallResponse]
ReadPrec CreateFirewallResponse
Int -> ReadS CreateFirewallResponse
ReadS [CreateFirewallResponse]
(Int -> ReadS CreateFirewallResponse)
-> ReadS [CreateFirewallResponse]
-> ReadPrec CreateFirewallResponse
-> ReadPrec [CreateFirewallResponse]
-> Read CreateFirewallResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFirewallResponse]
$creadListPrec :: ReadPrec [CreateFirewallResponse]
readPrec :: ReadPrec CreateFirewallResponse
$creadPrec :: ReadPrec CreateFirewallResponse
readList :: ReadS [CreateFirewallResponse]
$creadList :: ReadS [CreateFirewallResponse]
readsPrec :: Int -> ReadS CreateFirewallResponse
$creadsPrec :: Int -> ReadS CreateFirewallResponse
Prelude.Read, Int -> CreateFirewallResponse -> ShowS
[CreateFirewallResponse] -> ShowS
CreateFirewallResponse -> String
(Int -> CreateFirewallResponse -> ShowS)
-> (CreateFirewallResponse -> String)
-> ([CreateFirewallResponse] -> ShowS)
-> Show CreateFirewallResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFirewallResponse] -> ShowS
$cshowList :: [CreateFirewallResponse] -> ShowS
show :: CreateFirewallResponse -> String
$cshow :: CreateFirewallResponse -> String
showsPrec :: Int -> CreateFirewallResponse -> ShowS
$cshowsPrec :: Int -> CreateFirewallResponse -> ShowS
Prelude.Show, (forall x. CreateFirewallResponse -> Rep CreateFirewallResponse x)
-> (forall x.
Rep CreateFirewallResponse x -> CreateFirewallResponse)
-> Generic CreateFirewallResponse
forall x. Rep CreateFirewallResponse x -> CreateFirewallResponse
forall x. CreateFirewallResponse -> Rep CreateFirewallResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFirewallResponse x -> CreateFirewallResponse
$cfrom :: forall x. CreateFirewallResponse -> Rep CreateFirewallResponse x
Prelude.Generic)
newCreateFirewallResponse ::
Prelude.Int ->
CreateFirewallResponse
newCreateFirewallResponse :: Int -> CreateFirewallResponse
newCreateFirewallResponse Int
pHttpStatus_ =
CreateFirewallResponse' :: Maybe FirewallStatus
-> Maybe Firewall -> Int -> CreateFirewallResponse
CreateFirewallResponse'
{ $sel:firewallStatus:CreateFirewallResponse' :: Maybe FirewallStatus
firewallStatus =
Maybe FirewallStatus
forall a. Maybe a
Prelude.Nothing,
$sel:firewall:CreateFirewallResponse' :: Maybe Firewall
firewall = Maybe Firewall
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateFirewallResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createFirewallResponse_firewallStatus :: Lens.Lens' CreateFirewallResponse (Prelude.Maybe FirewallStatus)
createFirewallResponse_firewallStatus :: (Maybe FirewallStatus -> f (Maybe FirewallStatus))
-> CreateFirewallResponse -> f CreateFirewallResponse
createFirewallResponse_firewallStatus = (CreateFirewallResponse -> Maybe FirewallStatus)
-> (CreateFirewallResponse
-> Maybe FirewallStatus -> CreateFirewallResponse)
-> Lens
CreateFirewallResponse
CreateFirewallResponse
(Maybe FirewallStatus)
(Maybe FirewallStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallResponse' {Maybe FirewallStatus
firewallStatus :: Maybe FirewallStatus
$sel:firewallStatus:CreateFirewallResponse' :: CreateFirewallResponse -> Maybe FirewallStatus
firewallStatus} -> Maybe FirewallStatus
firewallStatus) (\s :: CreateFirewallResponse
s@CreateFirewallResponse' {} Maybe FirewallStatus
a -> CreateFirewallResponse
s {$sel:firewallStatus:CreateFirewallResponse' :: Maybe FirewallStatus
firewallStatus = Maybe FirewallStatus
a} :: CreateFirewallResponse)
createFirewallResponse_firewall :: Lens.Lens' CreateFirewallResponse (Prelude.Maybe Firewall)
createFirewallResponse_firewall :: (Maybe Firewall -> f (Maybe Firewall))
-> CreateFirewallResponse -> f CreateFirewallResponse
createFirewallResponse_firewall = (CreateFirewallResponse -> Maybe Firewall)
-> (CreateFirewallResponse
-> Maybe Firewall -> CreateFirewallResponse)
-> Lens
CreateFirewallResponse
CreateFirewallResponse
(Maybe Firewall)
(Maybe Firewall)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallResponse' {Maybe Firewall
firewall :: Maybe Firewall
$sel:firewall:CreateFirewallResponse' :: CreateFirewallResponse -> Maybe Firewall
firewall} -> Maybe Firewall
firewall) (\s :: CreateFirewallResponse
s@CreateFirewallResponse' {} Maybe Firewall
a -> CreateFirewallResponse
s {$sel:firewall:CreateFirewallResponse' :: Maybe Firewall
firewall = Maybe Firewall
a} :: CreateFirewallResponse)
createFirewallResponse_httpStatus :: Lens.Lens' CreateFirewallResponse Prelude.Int
createFirewallResponse_httpStatus :: (Int -> f Int)
-> CreateFirewallResponse -> f CreateFirewallResponse
createFirewallResponse_httpStatus = (CreateFirewallResponse -> Int)
-> (CreateFirewallResponse -> Int -> CreateFirewallResponse)
-> Lens CreateFirewallResponse CreateFirewallResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFirewallResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateFirewallResponse' :: CreateFirewallResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateFirewallResponse
s@CreateFirewallResponse' {} Int
a -> CreateFirewallResponse
s {$sel:httpStatus:CreateFirewallResponse' :: Int
httpStatus = Int
a} :: CreateFirewallResponse)
instance Prelude.NFData CreateFirewallResponse