{-# 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.ECS.Types.FSxWindowsFileServerAuthorizationConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FSxWindowsFileServerAuthorizationConfig = FSxWindowsFileServerAuthorizationConfig'
{
FSxWindowsFileServerAuthorizationConfig -> Text
credentialsParameter :: Prelude.Text,
FSxWindowsFileServerAuthorizationConfig -> Text
domain :: Prelude.Text
}
deriving (FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerAuthorizationConfig -> Bool
(FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerAuthorizationConfig -> Bool)
-> (FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerAuthorizationConfig -> Bool)
-> Eq FSxWindowsFileServerAuthorizationConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerAuthorizationConfig -> Bool
$c/= :: FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerAuthorizationConfig -> Bool
== :: FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerAuthorizationConfig -> Bool
$c== :: FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerAuthorizationConfig -> Bool
Prelude.Eq, ReadPrec [FSxWindowsFileServerAuthorizationConfig]
ReadPrec FSxWindowsFileServerAuthorizationConfig
Int -> ReadS FSxWindowsFileServerAuthorizationConfig
ReadS [FSxWindowsFileServerAuthorizationConfig]
(Int -> ReadS FSxWindowsFileServerAuthorizationConfig)
-> ReadS [FSxWindowsFileServerAuthorizationConfig]
-> ReadPrec FSxWindowsFileServerAuthorizationConfig
-> ReadPrec [FSxWindowsFileServerAuthorizationConfig]
-> Read FSxWindowsFileServerAuthorizationConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FSxWindowsFileServerAuthorizationConfig]
$creadListPrec :: ReadPrec [FSxWindowsFileServerAuthorizationConfig]
readPrec :: ReadPrec FSxWindowsFileServerAuthorizationConfig
$creadPrec :: ReadPrec FSxWindowsFileServerAuthorizationConfig
readList :: ReadS [FSxWindowsFileServerAuthorizationConfig]
$creadList :: ReadS [FSxWindowsFileServerAuthorizationConfig]
readsPrec :: Int -> ReadS FSxWindowsFileServerAuthorizationConfig
$creadsPrec :: Int -> ReadS FSxWindowsFileServerAuthorizationConfig
Prelude.Read, Int -> FSxWindowsFileServerAuthorizationConfig -> ShowS
[FSxWindowsFileServerAuthorizationConfig] -> ShowS
FSxWindowsFileServerAuthorizationConfig -> String
(Int -> FSxWindowsFileServerAuthorizationConfig -> ShowS)
-> (FSxWindowsFileServerAuthorizationConfig -> String)
-> ([FSxWindowsFileServerAuthorizationConfig] -> ShowS)
-> Show FSxWindowsFileServerAuthorizationConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FSxWindowsFileServerAuthorizationConfig] -> ShowS
$cshowList :: [FSxWindowsFileServerAuthorizationConfig] -> ShowS
show :: FSxWindowsFileServerAuthorizationConfig -> String
$cshow :: FSxWindowsFileServerAuthorizationConfig -> String
showsPrec :: Int -> FSxWindowsFileServerAuthorizationConfig -> ShowS
$cshowsPrec :: Int -> FSxWindowsFileServerAuthorizationConfig -> ShowS
Prelude.Show, (forall x.
FSxWindowsFileServerAuthorizationConfig
-> Rep FSxWindowsFileServerAuthorizationConfig x)
-> (forall x.
Rep FSxWindowsFileServerAuthorizationConfig x
-> FSxWindowsFileServerAuthorizationConfig)
-> Generic FSxWindowsFileServerAuthorizationConfig
forall x.
Rep FSxWindowsFileServerAuthorizationConfig x
-> FSxWindowsFileServerAuthorizationConfig
forall x.
FSxWindowsFileServerAuthorizationConfig
-> Rep FSxWindowsFileServerAuthorizationConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FSxWindowsFileServerAuthorizationConfig x
-> FSxWindowsFileServerAuthorizationConfig
$cfrom :: forall x.
FSxWindowsFileServerAuthorizationConfig
-> Rep FSxWindowsFileServerAuthorizationConfig x
Prelude.Generic)
newFSxWindowsFileServerAuthorizationConfig ::
Prelude.Text ->
Prelude.Text ->
FSxWindowsFileServerAuthorizationConfig
newFSxWindowsFileServerAuthorizationConfig :: Text -> Text -> FSxWindowsFileServerAuthorizationConfig
newFSxWindowsFileServerAuthorizationConfig
Text
pCredentialsParameter_
Text
pDomain_ =
FSxWindowsFileServerAuthorizationConfig' :: Text -> Text -> FSxWindowsFileServerAuthorizationConfig
FSxWindowsFileServerAuthorizationConfig'
{ $sel:credentialsParameter:FSxWindowsFileServerAuthorizationConfig' :: Text
credentialsParameter =
Text
pCredentialsParameter_,
$sel:domain:FSxWindowsFileServerAuthorizationConfig' :: Text
domain = Text
pDomain_
}
fSxWindowsFileServerAuthorizationConfig_credentialsParameter :: Lens.Lens' FSxWindowsFileServerAuthorizationConfig Prelude.Text
fSxWindowsFileServerAuthorizationConfig_credentialsParameter :: (Text -> f Text)
-> FSxWindowsFileServerAuthorizationConfig
-> f FSxWindowsFileServerAuthorizationConfig
fSxWindowsFileServerAuthorizationConfig_credentialsParameter = (FSxWindowsFileServerAuthorizationConfig -> Text)
-> (FSxWindowsFileServerAuthorizationConfig
-> Text -> FSxWindowsFileServerAuthorizationConfig)
-> Lens
FSxWindowsFileServerAuthorizationConfig
FSxWindowsFileServerAuthorizationConfig
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FSxWindowsFileServerAuthorizationConfig' {Text
credentialsParameter :: Text
$sel:credentialsParameter:FSxWindowsFileServerAuthorizationConfig' :: FSxWindowsFileServerAuthorizationConfig -> Text
credentialsParameter} -> Text
credentialsParameter) (\s :: FSxWindowsFileServerAuthorizationConfig
s@FSxWindowsFileServerAuthorizationConfig' {} Text
a -> FSxWindowsFileServerAuthorizationConfig
s {$sel:credentialsParameter:FSxWindowsFileServerAuthorizationConfig' :: Text
credentialsParameter = Text
a} :: FSxWindowsFileServerAuthorizationConfig)
fSxWindowsFileServerAuthorizationConfig_domain :: Lens.Lens' FSxWindowsFileServerAuthorizationConfig Prelude.Text
fSxWindowsFileServerAuthorizationConfig_domain :: (Text -> f Text)
-> FSxWindowsFileServerAuthorizationConfig
-> f FSxWindowsFileServerAuthorizationConfig
fSxWindowsFileServerAuthorizationConfig_domain = (FSxWindowsFileServerAuthorizationConfig -> Text)
-> (FSxWindowsFileServerAuthorizationConfig
-> Text -> FSxWindowsFileServerAuthorizationConfig)
-> Lens
FSxWindowsFileServerAuthorizationConfig
FSxWindowsFileServerAuthorizationConfig
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FSxWindowsFileServerAuthorizationConfig' {Text
domain :: Text
$sel:domain:FSxWindowsFileServerAuthorizationConfig' :: FSxWindowsFileServerAuthorizationConfig -> Text
domain} -> Text
domain) (\s :: FSxWindowsFileServerAuthorizationConfig
s@FSxWindowsFileServerAuthorizationConfig' {} Text
a -> FSxWindowsFileServerAuthorizationConfig
s {$sel:domain:FSxWindowsFileServerAuthorizationConfig' :: Text
domain = Text
a} :: FSxWindowsFileServerAuthorizationConfig)
instance
Core.FromJSON
FSxWindowsFileServerAuthorizationConfig
where
parseJSON :: Value -> Parser FSxWindowsFileServerAuthorizationConfig
parseJSON =
String
-> (Object -> Parser FSxWindowsFileServerAuthorizationConfig)
-> Value
-> Parser FSxWindowsFileServerAuthorizationConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FSxWindowsFileServerAuthorizationConfig"
( \Object
x ->
Text -> Text -> FSxWindowsFileServerAuthorizationConfig
FSxWindowsFileServerAuthorizationConfig'
(Text -> Text -> FSxWindowsFileServerAuthorizationConfig)
-> Parser Text
-> Parser (Text -> FSxWindowsFileServerAuthorizationConfig)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"credentialsParameter")
Parser (Text -> FSxWindowsFileServerAuthorizationConfig)
-> Parser Text -> Parser FSxWindowsFileServerAuthorizationConfig
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"domain")
)
instance
Prelude.Hashable
FSxWindowsFileServerAuthorizationConfig
instance
Prelude.NFData
FSxWindowsFileServerAuthorizationConfig
instance
Core.ToJSON
FSxWindowsFileServerAuthorizationConfig
where
toJSON :: FSxWindowsFileServerAuthorizationConfig -> Value
toJSON FSxWindowsFileServerAuthorizationConfig' {Text
domain :: Text
credentialsParameter :: Text
$sel:domain:FSxWindowsFileServerAuthorizationConfig' :: FSxWindowsFileServerAuthorizationConfig -> Text
$sel:credentialsParameter:FSxWindowsFileServerAuthorizationConfig' :: FSxWindowsFileServerAuthorizationConfig -> 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
"credentialsParameter"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
credentialsParameter
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"domain" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domain)
]
)