{-# 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.SecurityHub.Types.AwsElasticsearchDomainVPCOptions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsElasticsearchDomainVPCOptions = AwsElasticsearchDomainVPCOptions'
{
AwsElasticsearchDomainVPCOptions -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
AwsElasticsearchDomainVPCOptions -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
AwsElasticsearchDomainVPCOptions -> Maybe Text
vPCId :: Prelude.Maybe Prelude.Text,
AwsElasticsearchDomainVPCOptions -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text]
}
deriving (AwsElasticsearchDomainVPCOptions
-> AwsElasticsearchDomainVPCOptions -> Bool
(AwsElasticsearchDomainVPCOptions
-> AwsElasticsearchDomainVPCOptions -> Bool)
-> (AwsElasticsearchDomainVPCOptions
-> AwsElasticsearchDomainVPCOptions -> Bool)
-> Eq AwsElasticsearchDomainVPCOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsElasticsearchDomainVPCOptions
-> AwsElasticsearchDomainVPCOptions -> Bool
$c/= :: AwsElasticsearchDomainVPCOptions
-> AwsElasticsearchDomainVPCOptions -> Bool
== :: AwsElasticsearchDomainVPCOptions
-> AwsElasticsearchDomainVPCOptions -> Bool
$c== :: AwsElasticsearchDomainVPCOptions
-> AwsElasticsearchDomainVPCOptions -> Bool
Prelude.Eq, ReadPrec [AwsElasticsearchDomainVPCOptions]
ReadPrec AwsElasticsearchDomainVPCOptions
Int -> ReadS AwsElasticsearchDomainVPCOptions
ReadS [AwsElasticsearchDomainVPCOptions]
(Int -> ReadS AwsElasticsearchDomainVPCOptions)
-> ReadS [AwsElasticsearchDomainVPCOptions]
-> ReadPrec AwsElasticsearchDomainVPCOptions
-> ReadPrec [AwsElasticsearchDomainVPCOptions]
-> Read AwsElasticsearchDomainVPCOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsElasticsearchDomainVPCOptions]
$creadListPrec :: ReadPrec [AwsElasticsearchDomainVPCOptions]
readPrec :: ReadPrec AwsElasticsearchDomainVPCOptions
$creadPrec :: ReadPrec AwsElasticsearchDomainVPCOptions
readList :: ReadS [AwsElasticsearchDomainVPCOptions]
$creadList :: ReadS [AwsElasticsearchDomainVPCOptions]
readsPrec :: Int -> ReadS AwsElasticsearchDomainVPCOptions
$creadsPrec :: Int -> ReadS AwsElasticsearchDomainVPCOptions
Prelude.Read, Int -> AwsElasticsearchDomainVPCOptions -> ShowS
[AwsElasticsearchDomainVPCOptions] -> ShowS
AwsElasticsearchDomainVPCOptions -> String
(Int -> AwsElasticsearchDomainVPCOptions -> ShowS)
-> (AwsElasticsearchDomainVPCOptions -> String)
-> ([AwsElasticsearchDomainVPCOptions] -> ShowS)
-> Show AwsElasticsearchDomainVPCOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsElasticsearchDomainVPCOptions] -> ShowS
$cshowList :: [AwsElasticsearchDomainVPCOptions] -> ShowS
show :: AwsElasticsearchDomainVPCOptions -> String
$cshow :: AwsElasticsearchDomainVPCOptions -> String
showsPrec :: Int -> AwsElasticsearchDomainVPCOptions -> ShowS
$cshowsPrec :: Int -> AwsElasticsearchDomainVPCOptions -> ShowS
Prelude.Show, (forall x.
AwsElasticsearchDomainVPCOptions
-> Rep AwsElasticsearchDomainVPCOptions x)
-> (forall x.
Rep AwsElasticsearchDomainVPCOptions x
-> AwsElasticsearchDomainVPCOptions)
-> Generic AwsElasticsearchDomainVPCOptions
forall x.
Rep AwsElasticsearchDomainVPCOptions x
-> AwsElasticsearchDomainVPCOptions
forall x.
AwsElasticsearchDomainVPCOptions
-> Rep AwsElasticsearchDomainVPCOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsElasticsearchDomainVPCOptions x
-> AwsElasticsearchDomainVPCOptions
$cfrom :: forall x.
AwsElasticsearchDomainVPCOptions
-> Rep AwsElasticsearchDomainVPCOptions x
Prelude.Generic)
newAwsElasticsearchDomainVPCOptions ::
AwsElasticsearchDomainVPCOptions
newAwsElasticsearchDomainVPCOptions :: AwsElasticsearchDomainVPCOptions
newAwsElasticsearchDomainVPCOptions =
AwsElasticsearchDomainVPCOptions' :: Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> AwsElasticsearchDomainVPCOptions
AwsElasticsearchDomainVPCOptions'
{ $sel:securityGroupIds:AwsElasticsearchDomainVPCOptions' :: Maybe [Text]
securityGroupIds =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:subnetIds:AwsElasticsearchDomainVPCOptions' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:vPCId:AwsElasticsearchDomainVPCOptions' :: Maybe Text
vPCId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZones:AwsElasticsearchDomainVPCOptions' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
awsElasticsearchDomainVPCOptions_securityGroupIds :: Lens.Lens' AwsElasticsearchDomainVPCOptions (Prelude.Maybe [Prelude.Text])
awsElasticsearchDomainVPCOptions_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsElasticsearchDomainVPCOptions
-> f AwsElasticsearchDomainVPCOptions
awsElasticsearchDomainVPCOptions_securityGroupIds = (AwsElasticsearchDomainVPCOptions -> Maybe [Text])
-> (AwsElasticsearchDomainVPCOptions
-> Maybe [Text] -> AwsElasticsearchDomainVPCOptions)
-> Lens
AwsElasticsearchDomainVPCOptions
AwsElasticsearchDomainVPCOptions
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainVPCOptions' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:AwsElasticsearchDomainVPCOptions' :: AwsElasticsearchDomainVPCOptions -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: AwsElasticsearchDomainVPCOptions
s@AwsElasticsearchDomainVPCOptions' {} Maybe [Text]
a -> AwsElasticsearchDomainVPCOptions
s {$sel:securityGroupIds:AwsElasticsearchDomainVPCOptions' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: AwsElasticsearchDomainVPCOptions) ((Maybe [Text] -> f (Maybe [Text]))
-> AwsElasticsearchDomainVPCOptions
-> f AwsElasticsearchDomainVPCOptions)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsElasticsearchDomainVPCOptions
-> f AwsElasticsearchDomainVPCOptions
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
awsElasticsearchDomainVPCOptions_subnetIds :: Lens.Lens' AwsElasticsearchDomainVPCOptions (Prelude.Maybe [Prelude.Text])
awsElasticsearchDomainVPCOptions_subnetIds :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsElasticsearchDomainVPCOptions
-> f AwsElasticsearchDomainVPCOptions
awsElasticsearchDomainVPCOptions_subnetIds = (AwsElasticsearchDomainVPCOptions -> Maybe [Text])
-> (AwsElasticsearchDomainVPCOptions
-> Maybe [Text] -> AwsElasticsearchDomainVPCOptions)
-> Lens
AwsElasticsearchDomainVPCOptions
AwsElasticsearchDomainVPCOptions
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainVPCOptions' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:AwsElasticsearchDomainVPCOptions' :: AwsElasticsearchDomainVPCOptions -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: AwsElasticsearchDomainVPCOptions
s@AwsElasticsearchDomainVPCOptions' {} Maybe [Text]
a -> AwsElasticsearchDomainVPCOptions
s {$sel:subnetIds:AwsElasticsearchDomainVPCOptions' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: AwsElasticsearchDomainVPCOptions) ((Maybe [Text] -> f (Maybe [Text]))
-> AwsElasticsearchDomainVPCOptions
-> f AwsElasticsearchDomainVPCOptions)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsElasticsearchDomainVPCOptions
-> f AwsElasticsearchDomainVPCOptions
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
awsElasticsearchDomainVPCOptions_vPCId :: Lens.Lens' AwsElasticsearchDomainVPCOptions (Prelude.Maybe Prelude.Text)
awsElasticsearchDomainVPCOptions_vPCId :: (Maybe Text -> f (Maybe Text))
-> AwsElasticsearchDomainVPCOptions
-> f AwsElasticsearchDomainVPCOptions
awsElasticsearchDomainVPCOptions_vPCId = (AwsElasticsearchDomainVPCOptions -> Maybe Text)
-> (AwsElasticsearchDomainVPCOptions
-> Maybe Text -> AwsElasticsearchDomainVPCOptions)
-> Lens
AwsElasticsearchDomainVPCOptions
AwsElasticsearchDomainVPCOptions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainVPCOptions' {Maybe Text
vPCId :: Maybe Text
$sel:vPCId:AwsElasticsearchDomainVPCOptions' :: AwsElasticsearchDomainVPCOptions -> Maybe Text
vPCId} -> Maybe Text
vPCId) (\s :: AwsElasticsearchDomainVPCOptions
s@AwsElasticsearchDomainVPCOptions' {} Maybe Text
a -> AwsElasticsearchDomainVPCOptions
s {$sel:vPCId:AwsElasticsearchDomainVPCOptions' :: Maybe Text
vPCId = Maybe Text
a} :: AwsElasticsearchDomainVPCOptions)
awsElasticsearchDomainVPCOptions_availabilityZones :: Lens.Lens' AwsElasticsearchDomainVPCOptions (Prelude.Maybe [Prelude.Text])
awsElasticsearchDomainVPCOptions_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsElasticsearchDomainVPCOptions
-> f AwsElasticsearchDomainVPCOptions
awsElasticsearchDomainVPCOptions_availabilityZones = (AwsElasticsearchDomainVPCOptions -> Maybe [Text])
-> (AwsElasticsearchDomainVPCOptions
-> Maybe [Text] -> AwsElasticsearchDomainVPCOptions)
-> Lens
AwsElasticsearchDomainVPCOptions
AwsElasticsearchDomainVPCOptions
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticsearchDomainVPCOptions' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:AwsElasticsearchDomainVPCOptions' :: AwsElasticsearchDomainVPCOptions -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: AwsElasticsearchDomainVPCOptions
s@AwsElasticsearchDomainVPCOptions' {} Maybe [Text]
a -> AwsElasticsearchDomainVPCOptions
s {$sel:availabilityZones:AwsElasticsearchDomainVPCOptions' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: AwsElasticsearchDomainVPCOptions) ((Maybe [Text] -> f (Maybe [Text]))
-> AwsElasticsearchDomainVPCOptions
-> f AwsElasticsearchDomainVPCOptions)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsElasticsearchDomainVPCOptions
-> f AwsElasticsearchDomainVPCOptions
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
AwsElasticsearchDomainVPCOptions
where
parseJSON :: Value -> Parser AwsElasticsearchDomainVPCOptions
parseJSON =
String
-> (Object -> Parser AwsElasticsearchDomainVPCOptions)
-> Value
-> Parser AwsElasticsearchDomainVPCOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsElasticsearchDomainVPCOptions"
( \Object
x ->
Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> AwsElasticsearchDomainVPCOptions
AwsElasticsearchDomainVPCOptions'
(Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> AwsElasticsearchDomainVPCOptions)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text]
-> Maybe Text -> Maybe [Text] -> AwsElasticsearchDomainVPCOptions)
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] -> AwsElasticsearchDomainVPCOptions)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text -> Maybe [Text] -> AwsElasticsearchDomainVPCOptions)
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] -> AwsElasticsearchDomainVPCOptions)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> AwsElasticsearchDomainVPCOptions)
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] -> AwsElasticsearchDomainVPCOptions)
-> Parser (Maybe [Text]) -> Parser AwsElasticsearchDomainVPCOptions
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
AwsElasticsearchDomainVPCOptions
instance
Prelude.NFData
AwsElasticsearchDomainVPCOptions
instance Core.ToJSON AwsElasticsearchDomainVPCOptions where
toJSON :: AwsElasticsearchDomainVPCOptions -> Value
toJSON AwsElasticsearchDomainVPCOptions' {Maybe [Text]
Maybe Text
availabilityZones :: Maybe [Text]
vPCId :: Maybe Text
subnetIds :: Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:availabilityZones:AwsElasticsearchDomainVPCOptions' :: AwsElasticsearchDomainVPCOptions -> Maybe [Text]
$sel:vPCId:AwsElasticsearchDomainVPCOptions' :: AwsElasticsearchDomainVPCOptions -> Maybe Text
$sel:subnetIds:AwsElasticsearchDomainVPCOptions' :: AwsElasticsearchDomainVPCOptions -> Maybe [Text]
$sel:securityGroupIds:AwsElasticsearchDomainVPCOptions' :: AwsElasticsearchDomainVPCOptions -> 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,
(Text
"VPCId" 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
vPCId,
(Text
"AvailabilityZones" 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]
availabilityZones
]
)