{-# 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.DirectoryConnectSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DirectoryConnectSettings = DirectoryConnectSettings'
{
DirectoryConnectSettings -> Text
vpcId :: Prelude.Text,
DirectoryConnectSettings -> [Text]
subnetIds :: [Prelude.Text],
DirectoryConnectSettings -> [Text]
customerDnsIps :: [Prelude.Text],
DirectoryConnectSettings -> Text
customerUserName :: Prelude.Text
}
deriving (DirectoryConnectSettings -> DirectoryConnectSettings -> Bool
(DirectoryConnectSettings -> DirectoryConnectSettings -> Bool)
-> (DirectoryConnectSettings -> DirectoryConnectSettings -> Bool)
-> Eq DirectoryConnectSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DirectoryConnectSettings -> DirectoryConnectSettings -> Bool
$c/= :: DirectoryConnectSettings -> DirectoryConnectSettings -> Bool
== :: DirectoryConnectSettings -> DirectoryConnectSettings -> Bool
$c== :: DirectoryConnectSettings -> DirectoryConnectSettings -> Bool
Prelude.Eq, ReadPrec [DirectoryConnectSettings]
ReadPrec DirectoryConnectSettings
Int -> ReadS DirectoryConnectSettings
ReadS [DirectoryConnectSettings]
(Int -> ReadS DirectoryConnectSettings)
-> ReadS [DirectoryConnectSettings]
-> ReadPrec DirectoryConnectSettings
-> ReadPrec [DirectoryConnectSettings]
-> Read DirectoryConnectSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DirectoryConnectSettings]
$creadListPrec :: ReadPrec [DirectoryConnectSettings]
readPrec :: ReadPrec DirectoryConnectSettings
$creadPrec :: ReadPrec DirectoryConnectSettings
readList :: ReadS [DirectoryConnectSettings]
$creadList :: ReadS [DirectoryConnectSettings]
readsPrec :: Int -> ReadS DirectoryConnectSettings
$creadsPrec :: Int -> ReadS DirectoryConnectSettings
Prelude.Read, Int -> DirectoryConnectSettings -> ShowS
[DirectoryConnectSettings] -> ShowS
DirectoryConnectSettings -> String
(Int -> DirectoryConnectSettings -> ShowS)
-> (DirectoryConnectSettings -> String)
-> ([DirectoryConnectSettings] -> ShowS)
-> Show DirectoryConnectSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DirectoryConnectSettings] -> ShowS
$cshowList :: [DirectoryConnectSettings] -> ShowS
show :: DirectoryConnectSettings -> String
$cshow :: DirectoryConnectSettings -> String
showsPrec :: Int -> DirectoryConnectSettings -> ShowS
$cshowsPrec :: Int -> DirectoryConnectSettings -> ShowS
Prelude.Show, (forall x.
DirectoryConnectSettings -> Rep DirectoryConnectSettings x)
-> (forall x.
Rep DirectoryConnectSettings x -> DirectoryConnectSettings)
-> Generic DirectoryConnectSettings
forall x.
Rep DirectoryConnectSettings x -> DirectoryConnectSettings
forall x.
DirectoryConnectSettings -> Rep DirectoryConnectSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DirectoryConnectSettings x -> DirectoryConnectSettings
$cfrom :: forall x.
DirectoryConnectSettings -> Rep DirectoryConnectSettings x
Prelude.Generic)
newDirectoryConnectSettings ::
Prelude.Text ->
Prelude.Text ->
DirectoryConnectSettings
newDirectoryConnectSettings :: Text -> Text -> DirectoryConnectSettings
newDirectoryConnectSettings
Text
pVpcId_
Text
pCustomerUserName_ =
DirectoryConnectSettings' :: Text -> [Text] -> [Text] -> Text -> DirectoryConnectSettings
DirectoryConnectSettings'
{ $sel:vpcId:DirectoryConnectSettings' :: Text
vpcId = Text
pVpcId_,
$sel:subnetIds:DirectoryConnectSettings' :: [Text]
subnetIds = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:customerDnsIps:DirectoryConnectSettings' :: [Text]
customerDnsIps = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:customerUserName:DirectoryConnectSettings' :: Text
customerUserName = Text
pCustomerUserName_
}
directoryConnectSettings_vpcId :: Lens.Lens' DirectoryConnectSettings Prelude.Text
directoryConnectSettings_vpcId :: (Text -> f Text)
-> DirectoryConnectSettings -> f DirectoryConnectSettings
directoryConnectSettings_vpcId = (DirectoryConnectSettings -> Text)
-> (DirectoryConnectSettings -> Text -> DirectoryConnectSettings)
-> Lens DirectoryConnectSettings DirectoryConnectSettings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryConnectSettings' {Text
vpcId :: Text
$sel:vpcId:DirectoryConnectSettings' :: DirectoryConnectSettings -> Text
vpcId} -> Text
vpcId) (\s :: DirectoryConnectSettings
s@DirectoryConnectSettings' {} Text
a -> DirectoryConnectSettings
s {$sel:vpcId:DirectoryConnectSettings' :: Text
vpcId = Text
a} :: DirectoryConnectSettings)
directoryConnectSettings_subnetIds :: Lens.Lens' DirectoryConnectSettings [Prelude.Text]
directoryConnectSettings_subnetIds :: ([Text] -> f [Text])
-> DirectoryConnectSettings -> f DirectoryConnectSettings
directoryConnectSettings_subnetIds = (DirectoryConnectSettings -> [Text])
-> (DirectoryConnectSettings -> [Text] -> DirectoryConnectSettings)
-> Lens
DirectoryConnectSettings DirectoryConnectSettings [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryConnectSettings' {[Text]
subnetIds :: [Text]
$sel:subnetIds:DirectoryConnectSettings' :: DirectoryConnectSettings -> [Text]
subnetIds} -> [Text]
subnetIds) (\s :: DirectoryConnectSettings
s@DirectoryConnectSettings' {} [Text]
a -> DirectoryConnectSettings
s {$sel:subnetIds:DirectoryConnectSettings' :: [Text]
subnetIds = [Text]
a} :: DirectoryConnectSettings) (([Text] -> f [Text])
-> DirectoryConnectSettings -> f DirectoryConnectSettings)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> DirectoryConnectSettings
-> f DirectoryConnectSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
directoryConnectSettings_customerDnsIps :: Lens.Lens' DirectoryConnectSettings [Prelude.Text]
directoryConnectSettings_customerDnsIps :: ([Text] -> f [Text])
-> DirectoryConnectSettings -> f DirectoryConnectSettings
directoryConnectSettings_customerDnsIps = (DirectoryConnectSettings -> [Text])
-> (DirectoryConnectSettings -> [Text] -> DirectoryConnectSettings)
-> Lens
DirectoryConnectSettings DirectoryConnectSettings [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryConnectSettings' {[Text]
customerDnsIps :: [Text]
$sel:customerDnsIps:DirectoryConnectSettings' :: DirectoryConnectSettings -> [Text]
customerDnsIps} -> [Text]
customerDnsIps) (\s :: DirectoryConnectSettings
s@DirectoryConnectSettings' {} [Text]
a -> DirectoryConnectSettings
s {$sel:customerDnsIps:DirectoryConnectSettings' :: [Text]
customerDnsIps = [Text]
a} :: DirectoryConnectSettings) (([Text] -> f [Text])
-> DirectoryConnectSettings -> f DirectoryConnectSettings)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> DirectoryConnectSettings
-> f DirectoryConnectSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
directoryConnectSettings_customerUserName :: Lens.Lens' DirectoryConnectSettings Prelude.Text
directoryConnectSettings_customerUserName :: (Text -> f Text)
-> DirectoryConnectSettings -> f DirectoryConnectSettings
directoryConnectSettings_customerUserName = (DirectoryConnectSettings -> Text)
-> (DirectoryConnectSettings -> Text -> DirectoryConnectSettings)
-> Lens DirectoryConnectSettings DirectoryConnectSettings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectoryConnectSettings' {Text
customerUserName :: Text
$sel:customerUserName:DirectoryConnectSettings' :: DirectoryConnectSettings -> Text
customerUserName} -> Text
customerUserName) (\s :: DirectoryConnectSettings
s@DirectoryConnectSettings' {} Text
a -> DirectoryConnectSettings
s {$sel:customerUserName:DirectoryConnectSettings' :: Text
customerUserName = Text
a} :: DirectoryConnectSettings)
instance Prelude.Hashable DirectoryConnectSettings
instance Prelude.NFData DirectoryConnectSettings
instance Core.ToJSON DirectoryConnectSettings where
toJSON :: DirectoryConnectSettings -> Value
toJSON DirectoryConnectSettings' {[Text]
Text
customerUserName :: Text
customerDnsIps :: [Text]
subnetIds :: [Text]
vpcId :: Text
$sel:customerUserName:DirectoryConnectSettings' :: DirectoryConnectSettings -> Text
$sel:customerDnsIps:DirectoryConnectSettings' :: DirectoryConnectSettings -> [Text]
$sel:subnetIds:DirectoryConnectSettings' :: DirectoryConnectSettings -> [Text]
$sel:vpcId:DirectoryConnectSettings' :: DirectoryConnectSettings -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"VpcId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vpcId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SubnetIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
subnetIds),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"CustomerDnsIps" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
customerDnsIps),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"CustomerUserName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
customerUserName)
]
)