{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data VPCDerivedInfo = VPCDerivedInfo'
{
VPCDerivedInfo -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
VPCDerivedInfo -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
VPCDerivedInfo -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
VPCDerivedInfo -> Maybe Text
vPCId :: Prelude.Maybe Prelude.Text
}
deriving (VPCDerivedInfo -> VPCDerivedInfo -> Bool
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]
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
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. 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'
{ $sel:availabilityZones:VPCDerivedInfo' :: Maybe [Text]
availabilityZones =
forall a. Maybe a
Prelude.Nothing,
$sel:securityGroupIds:VPCDerivedInfo' :: Maybe [Text]
securityGroupIds = forall a. Maybe a
Prelude.Nothing,
$sel:subnetIds:VPCDerivedInfo' :: Maybe [Text]
subnetIds = forall a. Maybe a
Prelude.Nothing,
$sel:vPCId:VPCDerivedInfo' :: Maybe Text
vPCId = forall a. Maybe a
Prelude.Nothing
}
vPCDerivedInfo_availabilityZones :: Lens.Lens' VPCDerivedInfo (Prelude.Maybe [Prelude.Text])
vPCDerivedInfo_availabilityZones :: Lens' VPCDerivedInfo (Maybe [Text])
vPCDerivedInfo_availabilityZones = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
vPCDerivedInfo_securityGroupIds :: Lens.Lens' VPCDerivedInfo (Prelude.Maybe [Prelude.Text])
vPCDerivedInfo_securityGroupIds :: Lens' VPCDerivedInfo (Maybe [Text])
vPCDerivedInfo_securityGroupIds = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' VPCDerivedInfo (Maybe [Text])
vPCDerivedInfo_subnetIds = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' VPCDerivedInfo (Maybe Text)
vPCDerivedInfo_vPCId = 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)
instance Data.FromJSON VPCDerivedInfo where
parseJSON :: Value -> Parser VPCDerivedInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VPCDerivedInfo"
( \Object
x ->
Maybe [Text]
-> Maybe [Text] -> Maybe [Text] -> Maybe Text -> VPCDerivedInfo
VPCDerivedInfo'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AvailabilityZones"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SecurityGroupIds"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SubnetIds" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VPCId")
)
instance Prelude.Hashable VPCDerivedInfo where
hashWithSalt :: Int -> VPCDerivedInfo -> Int
hashWithSalt Int
_salt VPCDerivedInfo' {Maybe [Text]
Maybe Text
vPCId :: Maybe Text
subnetIds :: Maybe [Text]
securityGroupIds :: Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:vPCId:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe Text
$sel:subnetIds:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe [Text]
$sel:securityGroupIds:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe [Text]
$sel:availabilityZones:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
availabilityZones
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
securityGroupIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
subnetIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vPCId
instance Prelude.NFData VPCDerivedInfo where
rnf :: VPCDerivedInfo -> ()
rnf VPCDerivedInfo' {Maybe [Text]
Maybe Text
vPCId :: Maybe Text
subnetIds :: Maybe [Text]
securityGroupIds :: Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:vPCId:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe Text
$sel:subnetIds:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe [Text]
$sel:securityGroupIds:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe [Text]
$sel:availabilityZones:VPCDerivedInfo' :: VPCDerivedInfo -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
availabilityZones
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
securityGroupIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
subnetIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vPCId