{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.EKS.Types.VpcConfigRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VpcConfigRequest = VpcConfigRequest'
{
VpcConfigRequest -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
VpcConfigRequest -> Maybe Bool
endpointPrivateAccess :: Prelude.Maybe Prelude.Bool,
VpcConfigRequest -> Maybe [Text]
publicAccessCidrs :: Prelude.Maybe [Prelude.Text],
VpcConfigRequest -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
VpcConfigRequest -> Maybe Bool
endpointPublicAccess :: Prelude.Maybe Prelude.Bool
}
deriving (VpcConfigRequest -> VpcConfigRequest -> Bool
(VpcConfigRequest -> VpcConfigRequest -> Bool)
-> (VpcConfigRequest -> VpcConfigRequest -> Bool)
-> Eq VpcConfigRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcConfigRequest -> VpcConfigRequest -> Bool
$c/= :: VpcConfigRequest -> VpcConfigRequest -> Bool
== :: VpcConfigRequest -> VpcConfigRequest -> Bool
$c== :: VpcConfigRequest -> VpcConfigRequest -> Bool
Prelude.Eq, ReadPrec [VpcConfigRequest]
ReadPrec VpcConfigRequest
Int -> ReadS VpcConfigRequest
ReadS [VpcConfigRequest]
(Int -> ReadS VpcConfigRequest)
-> ReadS [VpcConfigRequest]
-> ReadPrec VpcConfigRequest
-> ReadPrec [VpcConfigRequest]
-> Read VpcConfigRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcConfigRequest]
$creadListPrec :: ReadPrec [VpcConfigRequest]
readPrec :: ReadPrec VpcConfigRequest
$creadPrec :: ReadPrec VpcConfigRequest
readList :: ReadS [VpcConfigRequest]
$creadList :: ReadS [VpcConfigRequest]
readsPrec :: Int -> ReadS VpcConfigRequest
$creadsPrec :: Int -> ReadS VpcConfigRequest
Prelude.Read, Int -> VpcConfigRequest -> ShowS
[VpcConfigRequest] -> ShowS
VpcConfigRequest -> String
(Int -> VpcConfigRequest -> ShowS)
-> (VpcConfigRequest -> String)
-> ([VpcConfigRequest] -> ShowS)
-> Show VpcConfigRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcConfigRequest] -> ShowS
$cshowList :: [VpcConfigRequest] -> ShowS
show :: VpcConfigRequest -> String
$cshow :: VpcConfigRequest -> String
showsPrec :: Int -> VpcConfigRequest -> ShowS
$cshowsPrec :: Int -> VpcConfigRequest -> ShowS
Prelude.Show, (forall x. VpcConfigRequest -> Rep VpcConfigRequest x)
-> (forall x. Rep VpcConfigRequest x -> VpcConfigRequest)
-> Generic VpcConfigRequest
forall x. Rep VpcConfigRequest x -> VpcConfigRequest
forall x. VpcConfigRequest -> Rep VpcConfigRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpcConfigRequest x -> VpcConfigRequest
$cfrom :: forall x. VpcConfigRequest -> Rep VpcConfigRequest x
Prelude.Generic)
newVpcConfigRequest ::
VpcConfigRequest
newVpcConfigRequest :: VpcConfigRequest
newVpcConfigRequest =
VpcConfigRequest' :: Maybe [Text]
-> Maybe Bool
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> VpcConfigRequest
VpcConfigRequest'
{ $sel:securityGroupIds:VpcConfigRequest' :: Maybe [Text]
securityGroupIds =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:endpointPrivateAccess:VpcConfigRequest' :: Maybe Bool
endpointPrivateAccess = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:publicAccessCidrs:VpcConfigRequest' :: Maybe [Text]
publicAccessCidrs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:subnetIds:VpcConfigRequest' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:endpointPublicAccess:VpcConfigRequest' :: Maybe Bool
endpointPublicAccess = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
vpcConfigRequest_securityGroupIds :: Lens.Lens' VpcConfigRequest (Prelude.Maybe [Prelude.Text])
vpcConfigRequest_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigRequest -> f VpcConfigRequest
vpcConfigRequest_securityGroupIds = (VpcConfigRequest -> Maybe [Text])
-> (VpcConfigRequest -> Maybe [Text] -> VpcConfigRequest)
-> Lens
VpcConfigRequest VpcConfigRequest (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigRequest' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:VpcConfigRequest' :: VpcConfigRequest -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: VpcConfigRequest
s@VpcConfigRequest' {} Maybe [Text]
a -> VpcConfigRequest
s {$sel:securityGroupIds:VpcConfigRequest' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: VpcConfigRequest) ((Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigRequest -> f VpcConfigRequest)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigRequest
-> f VpcConfigRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
vpcConfigRequest_endpointPrivateAccess :: Lens.Lens' VpcConfigRequest (Prelude.Maybe Prelude.Bool)
vpcConfigRequest_endpointPrivateAccess :: (Maybe Bool -> f (Maybe Bool))
-> VpcConfigRequest -> f VpcConfigRequest
vpcConfigRequest_endpointPrivateAccess = (VpcConfigRequest -> Maybe Bool)
-> (VpcConfigRequest -> Maybe Bool -> VpcConfigRequest)
-> Lens VpcConfigRequest VpcConfigRequest (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigRequest' {Maybe Bool
endpointPrivateAccess :: Maybe Bool
$sel:endpointPrivateAccess:VpcConfigRequest' :: VpcConfigRequest -> Maybe Bool
endpointPrivateAccess} -> Maybe Bool
endpointPrivateAccess) (\s :: VpcConfigRequest
s@VpcConfigRequest' {} Maybe Bool
a -> VpcConfigRequest
s {$sel:endpointPrivateAccess:VpcConfigRequest' :: Maybe Bool
endpointPrivateAccess = Maybe Bool
a} :: VpcConfigRequest)
vpcConfigRequest_publicAccessCidrs :: Lens.Lens' VpcConfigRequest (Prelude.Maybe [Prelude.Text])
vpcConfigRequest_publicAccessCidrs :: (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigRequest -> f VpcConfigRequest
vpcConfigRequest_publicAccessCidrs = (VpcConfigRequest -> Maybe [Text])
-> (VpcConfigRequest -> Maybe [Text] -> VpcConfigRequest)
-> Lens
VpcConfigRequest VpcConfigRequest (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigRequest' {Maybe [Text]
publicAccessCidrs :: Maybe [Text]
$sel:publicAccessCidrs:VpcConfigRequest' :: VpcConfigRequest -> Maybe [Text]
publicAccessCidrs} -> Maybe [Text]
publicAccessCidrs) (\s :: VpcConfigRequest
s@VpcConfigRequest' {} Maybe [Text]
a -> VpcConfigRequest
s {$sel:publicAccessCidrs:VpcConfigRequest' :: Maybe [Text]
publicAccessCidrs = Maybe [Text]
a} :: VpcConfigRequest) ((Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigRequest -> f VpcConfigRequest)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigRequest
-> f VpcConfigRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
vpcConfigRequest_subnetIds :: Lens.Lens' VpcConfigRequest (Prelude.Maybe [Prelude.Text])
vpcConfigRequest_subnetIds :: (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigRequest -> f VpcConfigRequest
vpcConfigRequest_subnetIds = (VpcConfigRequest -> Maybe [Text])
-> (VpcConfigRequest -> Maybe [Text] -> VpcConfigRequest)
-> Lens
VpcConfigRequest VpcConfigRequest (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigRequest' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:VpcConfigRequest' :: VpcConfigRequest -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: VpcConfigRequest
s@VpcConfigRequest' {} Maybe [Text]
a -> VpcConfigRequest
s {$sel:subnetIds:VpcConfigRequest' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: VpcConfigRequest) ((Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigRequest -> f VpcConfigRequest)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VpcConfigRequest
-> f VpcConfigRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
vpcConfigRequest_endpointPublicAccess :: Lens.Lens' VpcConfigRequest (Prelude.Maybe Prelude.Bool)
vpcConfigRequest_endpointPublicAccess :: (Maybe Bool -> f (Maybe Bool))
-> VpcConfigRequest -> f VpcConfigRequest
vpcConfigRequest_endpointPublicAccess = (VpcConfigRequest -> Maybe Bool)
-> (VpcConfigRequest -> Maybe Bool -> VpcConfigRequest)
-> Lens VpcConfigRequest VpcConfigRequest (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcConfigRequest' {Maybe Bool
endpointPublicAccess :: Maybe Bool
$sel:endpointPublicAccess:VpcConfigRequest' :: VpcConfigRequest -> Maybe Bool
endpointPublicAccess} -> Maybe Bool
endpointPublicAccess) (\s :: VpcConfigRequest
s@VpcConfigRequest' {} Maybe Bool
a -> VpcConfigRequest
s {$sel:endpointPublicAccess:VpcConfigRequest' :: Maybe Bool
endpointPublicAccess = Maybe Bool
a} :: VpcConfigRequest)
instance Prelude.Hashable VpcConfigRequest
instance Prelude.NFData VpcConfigRequest
instance Core.ToJSON VpcConfigRequest where
toJSON :: VpcConfigRequest -> Value
toJSON VpcConfigRequest' {Maybe Bool
Maybe [Text]
endpointPublicAccess :: Maybe Bool
subnetIds :: Maybe [Text]
publicAccessCidrs :: Maybe [Text]
endpointPrivateAccess :: Maybe Bool
securityGroupIds :: Maybe [Text]
$sel:endpointPublicAccess:VpcConfigRequest' :: VpcConfigRequest -> Maybe Bool
$sel:subnetIds:VpcConfigRequest' :: VpcConfigRequest -> Maybe [Text]
$sel:publicAccessCidrs:VpcConfigRequest' :: VpcConfigRequest -> Maybe [Text]
$sel:endpointPrivateAccess:VpcConfigRequest' :: VpcConfigRequest -> Maybe Bool
$sel:securityGroupIds:VpcConfigRequest' :: VpcConfigRequest -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"securityGroupIds" 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]
securityGroupIds,
(Text
"endpointPrivateAccess" 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
endpointPrivateAccess,
(Text
"publicAccessCidrs" 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]
publicAccessCidrs,
(Text
"subnetIds" 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]
subnetIds,
(Text
"endpointPublicAccess" 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
endpointPublicAccess
]
)