{-# 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.VPCDerivedInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VPCDerivedInfo = VPCDerivedInfo'
{
VPCDerivedInfo -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
VPCDerivedInfo -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
VPCDerivedInfo -> Maybe Text
vPCId :: Prelude.Maybe Prelude.Text,
VPCDerivedInfo -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text]
}
deriving (VPCDerivedInfo -> VPCDerivedInfo -> Bool
(VPCDerivedInfo -> VPCDerivedInfo -> Bool)
-> (VPCDerivedInfo -> VPCDerivedInfo -> Bool) -> Eq VPCDerivedInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VPCDerivedInfo -> VPCDerivedInfo -> Bool
$c/= :: VPCDerivedInfo -> VPCDerivedInfo -> Bool
== :: VPCDerivedInfo -> VPCDerivedInfo -> Bool
$c== :: VPCDerivedInfo -> VPCDerivedInfo -> Bool
Prelude.Eq, ReadPrec [VPCDerivedInfo]
ReadPrec VPCDerivedInfo
Int -> ReadS VPCDerivedInfo
ReadS [VPCDerivedInfo]
(Int -> ReadS VPCDerivedInfo)
-> ReadS [VPCDerivedInfo]
-> ReadPrec VPCDerivedInfo
-> ReadPrec [VPCDerivedInfo]
-> Read VPCDerivedInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VPCDerivedInfo]
$creadListPrec :: ReadPrec [VPCDerivedInfo]
readPrec :: ReadPrec VPCDerivedInfo
$creadPrec :: ReadPrec VPCDerivedInfo
readList :: ReadS [VPCDerivedInfo]
$creadList :: ReadS [VPCDerivedInfo]
readsPrec :: Int -> ReadS VPCDerivedInfo
$creadsPrec :: Int -> ReadS VPCDerivedInfo
Prelude.Read, Int -> VPCDerivedInfo -> ShowS
[VPCDerivedInfo] -> ShowS
VPCDerivedInfo -> String
(Int -> VPCDerivedInfo -> ShowS)
-> (VPCDerivedInfo -> String)
-> ([VPCDerivedInfo] -> ShowS)
-> Show VPCDerivedInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VPCDerivedInfo] -> ShowS
$cshowList :: [VPCDerivedInfo] -> ShowS
show :: VPCDerivedInfo -> String
$cshow :: VPCDerivedInfo -> String
showsPrec :: Int -> VPCDerivedInfo -> ShowS
$cshowsPrec :: Int -> VPCDerivedInfo -> ShowS
Prelude.Show, (forall x. VPCDerivedInfo -> Rep VPCDerivedInfo x)
-> (forall x. Rep VPCDerivedInfo x -> VPCDerivedInfo)
-> Generic VPCDerivedInfo
forall x. Rep VPCDerivedInfo x -> VPCDerivedInfo
forall x. VPCDerivedInfo -> Rep VPCDerivedInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VPCDerivedInfo x -> VPCDerivedInfo
$cfrom :: forall x. VPCDerivedInfo -> Rep VPCDerivedInfo x
Prelude.Generic)
newVPCDerivedInfo ::
VPCDerivedInfo
newVPCDerivedInfo :: VPCDerivedInfo
newVPCDerivedInfo =
VPCDerivedInfo' :: Maybe [Text]
-> Maybe [Text] -> Maybe Text -> Maybe [Text] -> VPCDerivedInfo
VPCDerivedInfo'
{ $sel:securityGroupIds:VPCDerivedInfo' :: Maybe [Text]
securityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:subnetIds:VPCDerivedInfo' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:vPCId:VPCDerivedInfo' :: Maybe Text
vPCId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZones:VPCDerivedInfo' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
vPCDerivedInfo_securityGroupIds :: Lens.Lens' VPCDerivedInfo (Prelude.Maybe [Prelude.Text])
vPCDerivedInfo_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> VPCDerivedInfo -> f VPCDerivedInfo
vPCDerivedInfo_securityGroupIds = (VPCDerivedInfo -> Maybe [Text])
-> (VPCDerivedInfo -> Maybe [Text] -> VPCDerivedInfo)
-> Lens VPCDerivedInfo VPCDerivedInfo (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VPCDerivedInfo' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: VPCDerivedInfo
s@VPCDerivedInfo' {} Maybe [Text]
a -> VPCDerivedInfo
s {$sel:securityGroupIds:VPCDerivedInfo' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: VPCDerivedInfo) ((Maybe [Text] -> f (Maybe [Text]))
-> VPCDerivedInfo -> f VPCDerivedInfo)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VPCDerivedInfo
-> f VPCDerivedInfo
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
vPCDerivedInfo_subnetIds :: Lens.Lens' VPCDerivedInfo (Prelude.Maybe [Prelude.Text])
vPCDerivedInfo_subnetIds :: (Maybe [Text] -> f (Maybe [Text]))
-> VPCDerivedInfo -> f VPCDerivedInfo
vPCDerivedInfo_subnetIds = (VPCDerivedInfo -> Maybe [Text])
-> (VPCDerivedInfo -> Maybe [Text] -> VPCDerivedInfo)
-> Lens VPCDerivedInfo VPCDerivedInfo (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VPCDerivedInfo' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: VPCDerivedInfo
s@VPCDerivedInfo' {} Maybe [Text]
a -> VPCDerivedInfo
s {$sel:subnetIds:VPCDerivedInfo' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: VPCDerivedInfo) ((Maybe [Text] -> f (Maybe [Text]))
-> VPCDerivedInfo -> f VPCDerivedInfo)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VPCDerivedInfo
-> f VPCDerivedInfo
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
vPCDerivedInfo_vPCId :: Lens.Lens' VPCDerivedInfo (Prelude.Maybe Prelude.Text)
vPCDerivedInfo_vPCId :: (Maybe Text -> f (Maybe Text))
-> VPCDerivedInfo -> f VPCDerivedInfo
vPCDerivedInfo_vPCId = (VPCDerivedInfo -> Maybe Text)
-> (VPCDerivedInfo -> Maybe Text -> VPCDerivedInfo)
-> Lens VPCDerivedInfo VPCDerivedInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VPCDerivedInfo' {Maybe Text
vPCId :: Maybe Text
$sel:vPCId:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe Text
vPCId} -> Maybe Text
vPCId) (\s :: VPCDerivedInfo
s@VPCDerivedInfo' {} Maybe Text
a -> VPCDerivedInfo
s {$sel:vPCId:VPCDerivedInfo' :: Maybe Text
vPCId = Maybe Text
a} :: VPCDerivedInfo)
vPCDerivedInfo_availabilityZones :: Lens.Lens' VPCDerivedInfo (Prelude.Maybe [Prelude.Text])
vPCDerivedInfo_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> VPCDerivedInfo -> f VPCDerivedInfo
vPCDerivedInfo_availabilityZones = (VPCDerivedInfo -> Maybe [Text])
-> (VPCDerivedInfo -> Maybe [Text] -> VPCDerivedInfo)
-> Lens VPCDerivedInfo VPCDerivedInfo (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VPCDerivedInfo' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: VPCDerivedInfo
s@VPCDerivedInfo' {} Maybe [Text]
a -> VPCDerivedInfo
s {$sel:availabilityZones:VPCDerivedInfo' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: VPCDerivedInfo) ((Maybe [Text] -> f (Maybe [Text]))
-> VPCDerivedInfo -> f VPCDerivedInfo)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VPCDerivedInfo
-> f VPCDerivedInfo
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 Core.FromJSON VPCDerivedInfo where
parseJSON :: Value -> Parser VPCDerivedInfo
parseJSON =
String
-> (Object -> Parser VPCDerivedInfo)
-> Value
-> Parser VPCDerivedInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VPCDerivedInfo"
( \Object
x ->
Maybe [Text]
-> Maybe [Text] -> Maybe Text -> Maybe [Text] -> VPCDerivedInfo
VPCDerivedInfo'
(Maybe [Text]
-> Maybe [Text] -> Maybe Text -> Maybe [Text] -> VPCDerivedInfo)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text] -> Maybe Text -> Maybe [Text] -> VPCDerivedInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecurityGroupIds"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [Text] -> Maybe Text -> Maybe [Text] -> VPCDerivedInfo)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> Maybe [Text] -> VPCDerivedInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubnetIds" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Text -> Maybe [Text] -> VPCDerivedInfo)
-> Parser (Maybe Text) -> Parser (Maybe [Text] -> VPCDerivedInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VPCId")
Parser (Maybe [Text] -> VPCDerivedInfo)
-> Parser (Maybe [Text]) -> Parser VPCDerivedInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AvailabilityZones"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable VPCDerivedInfo
instance Prelude.NFData VPCDerivedInfo