{-# 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.ElasticSearch.Types.VPCOptions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VPCOptions = VPCOptions'
{
VPCOptions -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
VPCOptions -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text]
}
deriving (VPCOptions -> VPCOptions -> Bool
(VPCOptions -> VPCOptions -> Bool)
-> (VPCOptions -> VPCOptions -> Bool) -> Eq VPCOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VPCOptions -> VPCOptions -> Bool
$c/= :: VPCOptions -> VPCOptions -> Bool
== :: VPCOptions -> VPCOptions -> Bool
$c== :: VPCOptions -> VPCOptions -> Bool
Prelude.Eq, ReadPrec [VPCOptions]
ReadPrec VPCOptions
Int -> ReadS VPCOptions
ReadS [VPCOptions]
(Int -> ReadS VPCOptions)
-> ReadS [VPCOptions]
-> ReadPrec VPCOptions
-> ReadPrec [VPCOptions]
-> Read VPCOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VPCOptions]
$creadListPrec :: ReadPrec [VPCOptions]
readPrec :: ReadPrec VPCOptions
$creadPrec :: ReadPrec VPCOptions
readList :: ReadS [VPCOptions]
$creadList :: ReadS [VPCOptions]
readsPrec :: Int -> ReadS VPCOptions
$creadsPrec :: Int -> ReadS VPCOptions
Prelude.Read, Int -> VPCOptions -> ShowS
[VPCOptions] -> ShowS
VPCOptions -> String
(Int -> VPCOptions -> ShowS)
-> (VPCOptions -> String)
-> ([VPCOptions] -> ShowS)
-> Show VPCOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VPCOptions] -> ShowS
$cshowList :: [VPCOptions] -> ShowS
show :: VPCOptions -> String
$cshow :: VPCOptions -> String
showsPrec :: Int -> VPCOptions -> ShowS
$cshowsPrec :: Int -> VPCOptions -> ShowS
Prelude.Show, (forall x. VPCOptions -> Rep VPCOptions x)
-> (forall x. Rep VPCOptions x -> VPCOptions) -> Generic VPCOptions
forall x. Rep VPCOptions x -> VPCOptions
forall x. VPCOptions -> Rep VPCOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VPCOptions x -> VPCOptions
$cfrom :: forall x. VPCOptions -> Rep VPCOptions x
Prelude.Generic)
newVPCOptions ::
VPCOptions
newVPCOptions :: VPCOptions
newVPCOptions =
VPCOptions' :: Maybe [Text] -> Maybe [Text] -> VPCOptions
VPCOptions'
{ $sel:securityGroupIds:VPCOptions' :: Maybe [Text]
securityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:subnetIds:VPCOptions' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
vPCOptions_securityGroupIds :: Lens.Lens' VPCOptions (Prelude.Maybe [Prelude.Text])
vPCOptions_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text])) -> VPCOptions -> f VPCOptions
vPCOptions_securityGroupIds = (VPCOptions -> Maybe [Text])
-> (VPCOptions -> Maybe [Text] -> VPCOptions)
-> Lens VPCOptions VPCOptions (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VPCOptions' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:VPCOptions' :: VPCOptions -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: VPCOptions
s@VPCOptions' {} Maybe [Text]
a -> VPCOptions
s {$sel:securityGroupIds:VPCOptions' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: VPCOptions) ((Maybe [Text] -> f (Maybe [Text])) -> VPCOptions -> f VPCOptions)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VPCOptions
-> f VPCOptions
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
vPCOptions_subnetIds :: Lens.Lens' VPCOptions (Prelude.Maybe [Prelude.Text])
vPCOptions_subnetIds :: (Maybe [Text] -> f (Maybe [Text])) -> VPCOptions -> f VPCOptions
vPCOptions_subnetIds = (VPCOptions -> Maybe [Text])
-> (VPCOptions -> Maybe [Text] -> VPCOptions)
-> Lens VPCOptions VPCOptions (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VPCOptions' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:VPCOptions' :: VPCOptions -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: VPCOptions
s@VPCOptions' {} Maybe [Text]
a -> VPCOptions
s {$sel:subnetIds:VPCOptions' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: VPCOptions) ((Maybe [Text] -> f (Maybe [Text])) -> VPCOptions -> f VPCOptions)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VPCOptions
-> f VPCOptions
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
instance Prelude.Hashable VPCOptions
instance Prelude.NFData VPCOptions
instance Core.ToJSON VPCOptions where
toJSON :: VPCOptions -> Value
toJSON VPCOptions' {Maybe [Text]
subnetIds :: Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:subnetIds:VPCOptions' :: VPCOptions -> Maybe [Text]
$sel:securityGroupIds:VPCOptions' :: VPCOptions -> 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
"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
]
)