{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DirectoryService.ConnectDirectory
(
ConnectDirectory (..),
newConnectDirectory,
connectDirectory_shortName,
connectDirectory_description,
connectDirectory_tags,
connectDirectory_name,
connectDirectory_password,
connectDirectory_size,
connectDirectory_connectSettings,
ConnectDirectoryResponse (..),
newConnectDirectoryResponse,
connectDirectoryResponse_directoryId,
connectDirectoryResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DirectoryService.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ConnectDirectory = ConnectDirectory'
{
ConnectDirectory -> Maybe Text
shortName :: Prelude.Maybe Prelude.Text,
ConnectDirectory -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ConnectDirectory -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
ConnectDirectory -> Text
name :: Prelude.Text,
ConnectDirectory -> Sensitive Text
password :: Core.Sensitive Prelude.Text,
ConnectDirectory -> DirectorySize
size :: DirectorySize,
ConnectDirectory -> DirectoryConnectSettings
connectSettings :: DirectoryConnectSettings
}
deriving (ConnectDirectory -> ConnectDirectory -> Bool
(ConnectDirectory -> ConnectDirectory -> Bool)
-> (ConnectDirectory -> ConnectDirectory -> Bool)
-> Eq ConnectDirectory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectDirectory -> ConnectDirectory -> Bool
$c/= :: ConnectDirectory -> ConnectDirectory -> Bool
== :: ConnectDirectory -> ConnectDirectory -> Bool
$c== :: ConnectDirectory -> ConnectDirectory -> Bool
Prelude.Eq, Int -> ConnectDirectory -> ShowS
[ConnectDirectory] -> ShowS
ConnectDirectory -> String
(Int -> ConnectDirectory -> ShowS)
-> (ConnectDirectory -> String)
-> ([ConnectDirectory] -> ShowS)
-> Show ConnectDirectory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectDirectory] -> ShowS
$cshowList :: [ConnectDirectory] -> ShowS
show :: ConnectDirectory -> String
$cshow :: ConnectDirectory -> String
showsPrec :: Int -> ConnectDirectory -> ShowS
$cshowsPrec :: Int -> ConnectDirectory -> ShowS
Prelude.Show, (forall x. ConnectDirectory -> Rep ConnectDirectory x)
-> (forall x. Rep ConnectDirectory x -> ConnectDirectory)
-> Generic ConnectDirectory
forall x. Rep ConnectDirectory x -> ConnectDirectory
forall x. ConnectDirectory -> Rep ConnectDirectory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConnectDirectory x -> ConnectDirectory
$cfrom :: forall x. ConnectDirectory -> Rep ConnectDirectory x
Prelude.Generic)
newConnectDirectory ::
Prelude.Text ->
Prelude.Text ->
DirectorySize ->
DirectoryConnectSettings ->
ConnectDirectory
newConnectDirectory :: Text
-> Text
-> DirectorySize
-> DirectoryConnectSettings
-> ConnectDirectory
newConnectDirectory
Text
pName_
Text
pPassword_
DirectorySize
pSize_
DirectoryConnectSettings
pConnectSettings_ =
ConnectDirectory' :: Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Sensitive Text
-> DirectorySize
-> DirectoryConnectSettings
-> ConnectDirectory
ConnectDirectory'
{ $sel:shortName:ConnectDirectory' :: Maybe Text
shortName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:ConnectDirectory' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ConnectDirectory' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:name:ConnectDirectory' :: Text
name = Text
pName_,
$sel:password:ConnectDirectory' :: Sensitive Text
password = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pPassword_,
$sel:size:ConnectDirectory' :: DirectorySize
size = DirectorySize
pSize_,
$sel:connectSettings:ConnectDirectory' :: DirectoryConnectSettings
connectSettings = DirectoryConnectSettings
pConnectSettings_
}
connectDirectory_shortName :: Lens.Lens' ConnectDirectory (Prelude.Maybe Prelude.Text)
connectDirectory_shortName :: (Maybe Text -> f (Maybe Text))
-> ConnectDirectory -> f ConnectDirectory
connectDirectory_shortName = (ConnectDirectory -> Maybe Text)
-> (ConnectDirectory -> Maybe Text -> ConnectDirectory)
-> Lens ConnectDirectory ConnectDirectory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectDirectory' {Maybe Text
shortName :: Maybe Text
$sel:shortName:ConnectDirectory' :: ConnectDirectory -> Maybe Text
shortName} -> Maybe Text
shortName) (\s :: ConnectDirectory
s@ConnectDirectory' {} Maybe Text
a -> ConnectDirectory
s {$sel:shortName:ConnectDirectory' :: Maybe Text
shortName = Maybe Text
a} :: ConnectDirectory)
connectDirectory_description :: Lens.Lens' ConnectDirectory (Prelude.Maybe Prelude.Text)
connectDirectory_description :: (Maybe Text -> f (Maybe Text))
-> ConnectDirectory -> f ConnectDirectory
connectDirectory_description = (ConnectDirectory -> Maybe Text)
-> (ConnectDirectory -> Maybe Text -> ConnectDirectory)
-> Lens ConnectDirectory ConnectDirectory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectDirectory' {Maybe Text
description :: Maybe Text
$sel:description:ConnectDirectory' :: ConnectDirectory -> Maybe Text
description} -> Maybe Text
description) (\s :: ConnectDirectory
s@ConnectDirectory' {} Maybe Text
a -> ConnectDirectory
s {$sel:description:ConnectDirectory' :: Maybe Text
description = Maybe Text
a} :: ConnectDirectory)
connectDirectory_tags :: Lens.Lens' ConnectDirectory (Prelude.Maybe [Tag])
connectDirectory_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> ConnectDirectory -> f ConnectDirectory
connectDirectory_tags = (ConnectDirectory -> Maybe [Tag])
-> (ConnectDirectory -> Maybe [Tag] -> ConnectDirectory)
-> Lens
ConnectDirectory ConnectDirectory (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectDirectory' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ConnectDirectory' :: ConnectDirectory -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ConnectDirectory
s@ConnectDirectory' {} Maybe [Tag]
a -> ConnectDirectory
s {$sel:tags:ConnectDirectory' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ConnectDirectory) ((Maybe [Tag] -> f (Maybe [Tag]))
-> ConnectDirectory -> f ConnectDirectory)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> ConnectDirectory
-> f ConnectDirectory
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
connectDirectory_name :: Lens.Lens' ConnectDirectory Prelude.Text
connectDirectory_name :: (Text -> f Text) -> ConnectDirectory -> f ConnectDirectory
connectDirectory_name = (ConnectDirectory -> Text)
-> (ConnectDirectory -> Text -> ConnectDirectory)
-> Lens ConnectDirectory ConnectDirectory Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectDirectory' {Text
name :: Text
$sel:name:ConnectDirectory' :: ConnectDirectory -> Text
name} -> Text
name) (\s :: ConnectDirectory
s@ConnectDirectory' {} Text
a -> ConnectDirectory
s {$sel:name:ConnectDirectory' :: Text
name = Text
a} :: ConnectDirectory)
connectDirectory_password :: Lens.Lens' ConnectDirectory Prelude.Text
connectDirectory_password :: (Text -> f Text) -> ConnectDirectory -> f ConnectDirectory
connectDirectory_password = (ConnectDirectory -> Sensitive Text)
-> (ConnectDirectory -> Sensitive Text -> ConnectDirectory)
-> Lens
ConnectDirectory ConnectDirectory (Sensitive Text) (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectDirectory' {Sensitive Text
password :: Sensitive Text
$sel:password:ConnectDirectory' :: ConnectDirectory -> Sensitive Text
password} -> Sensitive Text
password) (\s :: ConnectDirectory
s@ConnectDirectory' {} Sensitive Text
a -> ConnectDirectory
s {$sel:password:ConnectDirectory' :: Sensitive Text
password = Sensitive Text
a} :: ConnectDirectory) ((Sensitive Text -> f (Sensitive Text))
-> ConnectDirectory -> f ConnectDirectory)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> ConnectDirectory
-> f ConnectDirectory
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
connectDirectory_size :: Lens.Lens' ConnectDirectory DirectorySize
connectDirectory_size :: (DirectorySize -> f DirectorySize)
-> ConnectDirectory -> f ConnectDirectory
connectDirectory_size = (ConnectDirectory -> DirectorySize)
-> (ConnectDirectory -> DirectorySize -> ConnectDirectory)
-> Lens
ConnectDirectory ConnectDirectory DirectorySize DirectorySize
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectDirectory' {DirectorySize
size :: DirectorySize
$sel:size:ConnectDirectory' :: ConnectDirectory -> DirectorySize
size} -> DirectorySize
size) (\s :: ConnectDirectory
s@ConnectDirectory' {} DirectorySize
a -> ConnectDirectory
s {$sel:size:ConnectDirectory' :: DirectorySize
size = DirectorySize
a} :: ConnectDirectory)
connectDirectory_connectSettings :: Lens.Lens' ConnectDirectory DirectoryConnectSettings
connectDirectory_connectSettings :: (DirectoryConnectSettings -> f DirectoryConnectSettings)
-> ConnectDirectory -> f ConnectDirectory
connectDirectory_connectSettings = (ConnectDirectory -> DirectoryConnectSettings)
-> (ConnectDirectory
-> DirectoryConnectSettings -> ConnectDirectory)
-> Lens
ConnectDirectory
ConnectDirectory
DirectoryConnectSettings
DirectoryConnectSettings
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectDirectory' {DirectoryConnectSettings
connectSettings :: DirectoryConnectSettings
$sel:connectSettings:ConnectDirectory' :: ConnectDirectory -> DirectoryConnectSettings
connectSettings} -> DirectoryConnectSettings
connectSettings) (\s :: ConnectDirectory
s@ConnectDirectory' {} DirectoryConnectSettings
a -> ConnectDirectory
s {$sel:connectSettings:ConnectDirectory' :: DirectoryConnectSettings
connectSettings = DirectoryConnectSettings
a} :: ConnectDirectory)
instance Core.AWSRequest ConnectDirectory where
type
AWSResponse ConnectDirectory =
ConnectDirectoryResponse
request :: ConnectDirectory -> Request ConnectDirectory
request = Service -> ConnectDirectory -> Request ConnectDirectory
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ConnectDirectory
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ConnectDirectory)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ConnectDirectory))
-> Logger
-> Service
-> Proxy ConnectDirectory
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ConnectDirectory)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> ConnectDirectoryResponse
ConnectDirectoryResponse'
(Maybe Text -> Int -> ConnectDirectoryResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ConnectDirectoryResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DirectoryId")
Either String (Int -> ConnectDirectoryResponse)
-> Either String Int -> Either String ConnectDirectoryResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ConnectDirectory
instance Prelude.NFData ConnectDirectory
instance Core.ToHeaders ConnectDirectory where
toHeaders :: ConnectDirectory -> ResponseHeaders
toHeaders =
ResponseHeaders -> ConnectDirectory -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"DirectoryService_20150416.ConnectDirectory" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON ConnectDirectory where
toJSON :: ConnectDirectory -> Value
toJSON ConnectDirectory' {Maybe [Tag]
Maybe Text
Text
Sensitive Text
DirectoryConnectSettings
DirectorySize
connectSettings :: DirectoryConnectSettings
size :: DirectorySize
password :: Sensitive Text
name :: Text
tags :: Maybe [Tag]
description :: Maybe Text
shortName :: Maybe Text
$sel:connectSettings:ConnectDirectory' :: ConnectDirectory -> DirectoryConnectSettings
$sel:size:ConnectDirectory' :: ConnectDirectory -> DirectorySize
$sel:password:ConnectDirectory' :: ConnectDirectory -> Sensitive Text
$sel:name:ConnectDirectory' :: ConnectDirectory -> Text
$sel:tags:ConnectDirectory' :: ConnectDirectory -> Maybe [Tag]
$sel:description:ConnectDirectory' :: ConnectDirectory -> Maybe Text
$sel:shortName:ConnectDirectory' :: ConnectDirectory -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ShortName" 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
shortName,
(Text
"Description" 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
description,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Password" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
password),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Size" Text -> DirectorySize -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DirectorySize
size),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ConnectSettings" Text -> DirectoryConnectSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DirectoryConnectSettings
connectSettings)
]
)
instance Core.ToPath ConnectDirectory where
toPath :: ConnectDirectory -> ByteString
toPath = ByteString -> ConnectDirectory -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ConnectDirectory where
toQuery :: ConnectDirectory -> QueryString
toQuery = QueryString -> ConnectDirectory -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ConnectDirectoryResponse = ConnectDirectoryResponse'
{
ConnectDirectoryResponse -> Maybe Text
directoryId :: Prelude.Maybe Prelude.Text,
ConnectDirectoryResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ConnectDirectoryResponse -> ConnectDirectoryResponse -> Bool
(ConnectDirectoryResponse -> ConnectDirectoryResponse -> Bool)
-> (ConnectDirectoryResponse -> ConnectDirectoryResponse -> Bool)
-> Eq ConnectDirectoryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectDirectoryResponse -> ConnectDirectoryResponse -> Bool
$c/= :: ConnectDirectoryResponse -> ConnectDirectoryResponse -> Bool
== :: ConnectDirectoryResponse -> ConnectDirectoryResponse -> Bool
$c== :: ConnectDirectoryResponse -> ConnectDirectoryResponse -> Bool
Prelude.Eq, ReadPrec [ConnectDirectoryResponse]
ReadPrec ConnectDirectoryResponse
Int -> ReadS ConnectDirectoryResponse
ReadS [ConnectDirectoryResponse]
(Int -> ReadS ConnectDirectoryResponse)
-> ReadS [ConnectDirectoryResponse]
-> ReadPrec ConnectDirectoryResponse
-> ReadPrec [ConnectDirectoryResponse]
-> Read ConnectDirectoryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectDirectoryResponse]
$creadListPrec :: ReadPrec [ConnectDirectoryResponse]
readPrec :: ReadPrec ConnectDirectoryResponse
$creadPrec :: ReadPrec ConnectDirectoryResponse
readList :: ReadS [ConnectDirectoryResponse]
$creadList :: ReadS [ConnectDirectoryResponse]
readsPrec :: Int -> ReadS ConnectDirectoryResponse
$creadsPrec :: Int -> ReadS ConnectDirectoryResponse
Prelude.Read, Int -> ConnectDirectoryResponse -> ShowS
[ConnectDirectoryResponse] -> ShowS
ConnectDirectoryResponse -> String
(Int -> ConnectDirectoryResponse -> ShowS)
-> (ConnectDirectoryResponse -> String)
-> ([ConnectDirectoryResponse] -> ShowS)
-> Show ConnectDirectoryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectDirectoryResponse] -> ShowS
$cshowList :: [ConnectDirectoryResponse] -> ShowS
show :: ConnectDirectoryResponse -> String
$cshow :: ConnectDirectoryResponse -> String
showsPrec :: Int -> ConnectDirectoryResponse -> ShowS
$cshowsPrec :: Int -> ConnectDirectoryResponse -> ShowS
Prelude.Show, (forall x.
ConnectDirectoryResponse -> Rep ConnectDirectoryResponse x)
-> (forall x.
Rep ConnectDirectoryResponse x -> ConnectDirectoryResponse)
-> Generic ConnectDirectoryResponse
forall x.
Rep ConnectDirectoryResponse x -> ConnectDirectoryResponse
forall x.
ConnectDirectoryResponse -> Rep ConnectDirectoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConnectDirectoryResponse x -> ConnectDirectoryResponse
$cfrom :: forall x.
ConnectDirectoryResponse -> Rep ConnectDirectoryResponse x
Prelude.Generic)
newConnectDirectoryResponse ::
Prelude.Int ->
ConnectDirectoryResponse
newConnectDirectoryResponse :: Int -> ConnectDirectoryResponse
newConnectDirectoryResponse Int
pHttpStatus_ =
ConnectDirectoryResponse' :: Maybe Text -> Int -> ConnectDirectoryResponse
ConnectDirectoryResponse'
{ $sel:directoryId:ConnectDirectoryResponse' :: Maybe Text
directoryId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ConnectDirectoryResponse' :: Int
httpStatus = Int
pHttpStatus_
}
connectDirectoryResponse_directoryId :: Lens.Lens' ConnectDirectoryResponse (Prelude.Maybe Prelude.Text)
connectDirectoryResponse_directoryId :: (Maybe Text -> f (Maybe Text))
-> ConnectDirectoryResponse -> f ConnectDirectoryResponse
connectDirectoryResponse_directoryId = (ConnectDirectoryResponse -> Maybe Text)
-> (ConnectDirectoryResponse
-> Maybe Text -> ConnectDirectoryResponse)
-> Lens
ConnectDirectoryResponse
ConnectDirectoryResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectDirectoryResponse' {Maybe Text
directoryId :: Maybe Text
$sel:directoryId:ConnectDirectoryResponse' :: ConnectDirectoryResponse -> Maybe Text
directoryId} -> Maybe Text
directoryId) (\s :: ConnectDirectoryResponse
s@ConnectDirectoryResponse' {} Maybe Text
a -> ConnectDirectoryResponse
s {$sel:directoryId:ConnectDirectoryResponse' :: Maybe Text
directoryId = Maybe Text
a} :: ConnectDirectoryResponse)
connectDirectoryResponse_httpStatus :: Lens.Lens' ConnectDirectoryResponse Prelude.Int
connectDirectoryResponse_httpStatus :: (Int -> f Int)
-> ConnectDirectoryResponse -> f ConnectDirectoryResponse
connectDirectoryResponse_httpStatus = (ConnectDirectoryResponse -> Int)
-> (ConnectDirectoryResponse -> Int -> ConnectDirectoryResponse)
-> Lens ConnectDirectoryResponse ConnectDirectoryResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectDirectoryResponse' {Int
httpStatus :: Int
$sel:httpStatus:ConnectDirectoryResponse' :: ConnectDirectoryResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ConnectDirectoryResponse
s@ConnectDirectoryResponse' {} Int
a -> ConnectDirectoryResponse
s {$sel:httpStatus:ConnectDirectoryResponse' :: Int
httpStatus = Int
a} :: ConnectDirectoryResponse)
instance Prelude.NFData ConnectDirectoryResponse