{-# 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.DirectoryService.Types.DirectoryConnectSettingsDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DirectoryConnectSettingsDescription = DirectoryConnectSettingsDescription'
{
DirectoryConnectSettingsDescription -> Maybe Text
customerUserName :: Prelude.Maybe Prelude.Text,
DirectoryConnectSettingsDescription -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
DirectoryConnectSettingsDescription -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
DirectoryConnectSettingsDescription -> Maybe Text
securityGroupId :: Prelude.Maybe Prelude.Text,
DirectoryConnectSettingsDescription -> Maybe [Text]
connectIps :: Prelude.Maybe [Prelude.Text],
DirectoryConnectSettingsDescription -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text]
}
deriving (DirectoryConnectSettingsDescription
-> DirectoryConnectSettingsDescription -> Bool
(DirectoryConnectSettingsDescription
-> DirectoryConnectSettingsDescription -> Bool)
-> (DirectoryConnectSettingsDescription
-> DirectoryConnectSettingsDescription -> Bool)
-> Eq DirectoryConnectSettingsDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DirectoryConnectSettingsDescription
-> DirectoryConnectSettingsDescription -> Bool
$c/= :: DirectoryConnectSettingsDescription
-> DirectoryConnectSettingsDescription -> Bool
== :: DirectoryConnectSettingsDescription
-> DirectoryConnectSettingsDescription -> Bool
$c== :: DirectoryConnectSettingsDescription
-> DirectoryConnectSettingsDescription -> Bool
Prelude.Eq, ReadPrec [DirectoryConnectSettingsDescription]
ReadPrec DirectoryConnectSettingsDescription
Int -> ReadS DirectoryConnectSettingsDescription
ReadS [DirectoryConnectSettingsDescription]
(Int -> ReadS DirectoryConnectSettingsDescription)
-> ReadS [DirectoryConnectSettingsDescription]
-> ReadPrec DirectoryConnectSettingsDescription
-> ReadPrec [DirectoryConnectSettingsDescription]
-> Read DirectoryConnectSettingsDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DirectoryConnectSettingsDescription]
$creadListPrec :: ReadPrec [DirectoryConnectSettingsDescription]
readPrec :: ReadPrec DirectoryConnectSettingsDescription
$creadPrec :: ReadPrec DirectoryConnectSettingsDescription
readList :: ReadS [DirectoryConnectSettingsDescription]
$creadList :: ReadS [DirectoryConnectSettingsDescription]
readsPrec :: Int -> ReadS DirectoryConnectSettingsDescription
$creadsPrec :: Int -> ReadS DirectoryConnectSettingsDescription
Prelude.Read, Int -> DirectoryConnectSettingsDescription -> ShowS
[DirectoryConnectSettingsDescription] -> ShowS
DirectoryConnectSettingsDescription -> String
(Int -> DirectoryConnectSettingsDescription -> ShowS)
-> (DirectoryConnectSettingsDescription -> String)
-> ([DirectoryConnectSettingsDescription] -> ShowS)
-> Show DirectoryConnectSettingsDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DirectoryConnectSettingsDescription] -> ShowS
$cshowList :: [DirectoryConnectSettingsDescription] -> ShowS
show :: DirectoryConnectSettingsDescription -> String
$cshow :: DirectoryConnectSettingsDescription -> String
showsPrec :: Int -> DirectoryConnectSettingsDescription -> ShowS
$cshowsPrec :: Int -> DirectoryConnectSettingsDescription -> ShowS
Prelude.Show, (forall x.
DirectoryConnectSettingsDescription
-> Rep DirectoryConnectSettingsDescription x)
-> (forall x.
Rep DirectoryConnectSettingsDescription x
-> DirectoryConnectSettingsDescription)
-> Generic DirectoryConnectSettingsDescription
forall x.
Rep DirectoryConnectSettingsDescription x
-> DirectoryConnectSettingsDescription
forall x.
DirectoryConnectSettingsDescription
-> Rep DirectoryConnectSettingsDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DirectoryConnectSettingsDescription x
-> DirectoryConnectSettingsDescription
$cfrom :: forall x.
DirectoryConnectSettingsDescription
-> Rep DirectoryConnectSettingsDescription x
Prelude.Generic)
newDirectoryConnectSettingsDescription ::
DirectoryConnectSettingsDescription
newDirectoryConnectSettingsDescription :: DirectoryConnectSettingsDescription
newDirectoryConnectSettingsDescription =
DirectoryConnectSettingsDescription' :: Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> DirectoryConnectSettingsDescription
DirectoryConnectSettingsDescription'
{ $sel:customerUserName:DirectoryConnectSettingsDescription' :: Maybe Text
customerUserName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:subnetIds:DirectoryConnectSettingsDescription' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:DirectoryConnectSettingsDescription' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:securityGroupId:DirectoryConnectSettingsDescription' :: Maybe Text
securityGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:connectIps:DirectoryConnectSettingsDescription' :: Maybe [Text]
connectIps = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZones:DirectoryConnectSettingsDescription' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
directoryConnectSettingsDescription_customerUserName :: Lens.Lens' DirectoryConnectSettingsDescription (Prelude.Maybe Prelude.Text)
directoryConnectSettingsDescription_customerUserName :: (Maybe Text -> f (Maybe Text))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription
directoryConnectSettingsDescription_customerUserName = (DirectoryConnectSettingsDescription -> Maybe Text)
-> (DirectoryConnectSettingsDescription
-> Maybe Text -> DirectoryConnectSettingsDescription)
-> Lens
DirectoryConnectSettingsDescription
DirectoryConnectSettingsDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryConnectSettingsDescription' {Maybe Text
customerUserName :: Maybe Text
$sel:customerUserName:DirectoryConnectSettingsDescription' :: DirectoryConnectSettingsDescription -> Maybe Text
customerUserName} -> Maybe Text
customerUserName) (\s :: DirectoryConnectSettingsDescription
s@DirectoryConnectSettingsDescription' {} Maybe Text
a -> DirectoryConnectSettingsDescription
s {$sel:customerUserName:DirectoryConnectSettingsDescription' :: Maybe Text
customerUserName = Maybe Text
a} :: DirectoryConnectSettingsDescription)
directoryConnectSettingsDescription_subnetIds :: Lens.Lens' DirectoryConnectSettingsDescription (Prelude.Maybe [Prelude.Text])
directoryConnectSettingsDescription_subnetIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription
directoryConnectSettingsDescription_subnetIds = (DirectoryConnectSettingsDescription -> Maybe [Text])
-> (DirectoryConnectSettingsDescription
-> Maybe [Text] -> DirectoryConnectSettingsDescription)
-> Lens
DirectoryConnectSettingsDescription
DirectoryConnectSettingsDescription
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryConnectSettingsDescription' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:DirectoryConnectSettingsDescription' :: DirectoryConnectSettingsDescription -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: DirectoryConnectSettingsDescription
s@DirectoryConnectSettingsDescription' {} Maybe [Text]
a -> DirectoryConnectSettingsDescription
s {$sel:subnetIds:DirectoryConnectSettingsDescription' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: DirectoryConnectSettingsDescription) ((Maybe [Text] -> f (Maybe [Text]))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription
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
directoryConnectSettingsDescription_vpcId :: Lens.Lens' DirectoryConnectSettingsDescription (Prelude.Maybe Prelude.Text)
directoryConnectSettingsDescription_vpcId :: (Maybe Text -> f (Maybe Text))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription
directoryConnectSettingsDescription_vpcId = (DirectoryConnectSettingsDescription -> Maybe Text)
-> (DirectoryConnectSettingsDescription
-> Maybe Text -> DirectoryConnectSettingsDescription)
-> Lens
DirectoryConnectSettingsDescription
DirectoryConnectSettingsDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryConnectSettingsDescription' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:DirectoryConnectSettingsDescription' :: DirectoryConnectSettingsDescription -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: DirectoryConnectSettingsDescription
s@DirectoryConnectSettingsDescription' {} Maybe Text
a -> DirectoryConnectSettingsDescription
s {$sel:vpcId:DirectoryConnectSettingsDescription' :: Maybe Text
vpcId = Maybe Text
a} :: DirectoryConnectSettingsDescription)
directoryConnectSettingsDescription_securityGroupId :: Lens.Lens' DirectoryConnectSettingsDescription (Prelude.Maybe Prelude.Text)
directoryConnectSettingsDescription_securityGroupId :: (Maybe Text -> f (Maybe Text))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription
directoryConnectSettingsDescription_securityGroupId = (DirectoryConnectSettingsDescription -> Maybe Text)
-> (DirectoryConnectSettingsDescription
-> Maybe Text -> DirectoryConnectSettingsDescription)
-> Lens
DirectoryConnectSettingsDescription
DirectoryConnectSettingsDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryConnectSettingsDescription' {Maybe Text
securityGroupId :: Maybe Text
$sel:securityGroupId:DirectoryConnectSettingsDescription' :: DirectoryConnectSettingsDescription -> Maybe Text
securityGroupId} -> Maybe Text
securityGroupId) (\s :: DirectoryConnectSettingsDescription
s@DirectoryConnectSettingsDescription' {} Maybe Text
a -> DirectoryConnectSettingsDescription
s {$sel:securityGroupId:DirectoryConnectSettingsDescription' :: Maybe Text
securityGroupId = Maybe Text
a} :: DirectoryConnectSettingsDescription)
directoryConnectSettingsDescription_connectIps :: Lens.Lens' DirectoryConnectSettingsDescription (Prelude.Maybe [Prelude.Text])
directoryConnectSettingsDescription_connectIps :: (Maybe [Text] -> f (Maybe [Text]))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription
directoryConnectSettingsDescription_connectIps = (DirectoryConnectSettingsDescription -> Maybe [Text])
-> (DirectoryConnectSettingsDescription
-> Maybe [Text] -> DirectoryConnectSettingsDescription)
-> Lens
DirectoryConnectSettingsDescription
DirectoryConnectSettingsDescription
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryConnectSettingsDescription' {Maybe [Text]
connectIps :: Maybe [Text]
$sel:connectIps:DirectoryConnectSettingsDescription' :: DirectoryConnectSettingsDescription -> Maybe [Text]
connectIps} -> Maybe [Text]
connectIps) (\s :: DirectoryConnectSettingsDescription
s@DirectoryConnectSettingsDescription' {} Maybe [Text]
a -> DirectoryConnectSettingsDescription
s {$sel:connectIps:DirectoryConnectSettingsDescription' :: Maybe [Text]
connectIps = Maybe [Text]
a} :: DirectoryConnectSettingsDescription) ((Maybe [Text] -> f (Maybe [Text]))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription
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
directoryConnectSettingsDescription_availabilityZones :: Lens.Lens' DirectoryConnectSettingsDescription (Prelude.Maybe [Prelude.Text])
directoryConnectSettingsDescription_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription
directoryConnectSettingsDescription_availabilityZones = (DirectoryConnectSettingsDescription -> Maybe [Text])
-> (DirectoryConnectSettingsDescription
-> Maybe [Text] -> DirectoryConnectSettingsDescription)
-> Lens
DirectoryConnectSettingsDescription
DirectoryConnectSettingsDescription
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryConnectSettingsDescription' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:DirectoryConnectSettingsDescription' :: DirectoryConnectSettingsDescription -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: DirectoryConnectSettingsDescription
s@DirectoryConnectSettingsDescription' {} Maybe [Text]
a -> DirectoryConnectSettingsDescription
s {$sel:availabilityZones:DirectoryConnectSettingsDescription' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: DirectoryConnectSettingsDescription) ((Maybe [Text] -> f (Maybe [Text]))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DirectoryConnectSettingsDescription
-> f DirectoryConnectSettingsDescription
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
DirectoryConnectSettingsDescription
where
parseJSON :: Value -> Parser DirectoryConnectSettingsDescription
parseJSON =
String
-> (Object -> Parser DirectoryConnectSettingsDescription)
-> Value
-> Parser DirectoryConnectSettingsDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DirectoryConnectSettingsDescription"
( \Object
x ->
Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> DirectoryConnectSettingsDescription
DirectoryConnectSettingsDescription'
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> DirectoryConnectSettingsDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> DirectoryConnectSettingsDescription)
forall (f :: * -> *) a b. Functor 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
"CustomerUserName")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> DirectoryConnectSettingsDescription)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> DirectoryConnectSettingsDescription)
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
-> Maybe [Text]
-> Maybe [Text]
-> DirectoryConnectSettingsDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> DirectoryConnectSettingsDescription)
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
-> Maybe [Text]
-> Maybe [Text]
-> DirectoryConnectSettingsDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe [Text] -> DirectoryConnectSettingsDescription)
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
"SecurityGroupId")
Parser
(Maybe [Text]
-> Maybe [Text] -> DirectoryConnectSettingsDescription)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> DirectoryConnectSettingsDescription)
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
"ConnectIps" 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] -> DirectoryConnectSettingsDescription)
-> Parser (Maybe [Text])
-> Parser DirectoryConnectSettingsDescription
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
DirectoryConnectSettingsDescription
instance
Prelude.NFData
DirectoryConnectSettingsDescription