{-# 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.MemoryDb.Types.User where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MemoryDb.Types.Authentication
import qualified Amazonka.Prelude as Prelude
data User = User'
{
User -> Maybe [Text]
aCLNames :: Prelude.Maybe [Prelude.Text],
User -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
User -> Maybe Text
accessString :: Prelude.Maybe Prelude.Text,
User -> Maybe Authentication
authentication :: Prelude.Maybe Authentication,
User -> Maybe Text
minimumEngineVersion :: Prelude.Maybe Prelude.Text,
User -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
User -> Maybe Text
status :: Prelude.Maybe Prelude.Text
}
deriving (User -> User -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: User -> User -> Bool
$c/= :: User -> User -> Bool
== :: User -> User -> Bool
$c== :: User -> User -> Bool
Prelude.Eq, ReadPrec [User]
ReadPrec User
Int -> ReadS User
ReadS [User]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [User]
$creadListPrec :: ReadPrec [User]
readPrec :: ReadPrec User
$creadPrec :: ReadPrec User
readList :: ReadS [User]
$creadList :: ReadS [User]
readsPrec :: Int -> ReadS User
$creadsPrec :: Int -> ReadS User
Prelude.Read, Int -> User -> ShowS
[User] -> ShowS
User -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [User] -> ShowS
$cshowList :: [User] -> ShowS
show :: User -> String
$cshow :: User -> String
showsPrec :: Int -> User -> ShowS
$cshowsPrec :: Int -> User -> ShowS
Prelude.Show, forall x. Rep User x -> User
forall x. User -> Rep User x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep User x -> User
$cfrom :: forall x. User -> Rep User x
Prelude.Generic)
newUser ::
User
newUser :: User
newUser =
User'
{ $sel:aCLNames:User' :: Maybe [Text]
aCLNames = forall a. Maybe a
Prelude.Nothing,
$sel:arn:User' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:accessString:User' :: Maybe Text
accessString = forall a. Maybe a
Prelude.Nothing,
$sel:authentication:User' :: Maybe Authentication
authentication = forall a. Maybe a
Prelude.Nothing,
$sel:minimumEngineVersion:User' :: Maybe Text
minimumEngineVersion = forall a. Maybe a
Prelude.Nothing,
$sel:name:User' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:status:User' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing
}
user_aCLNames :: Lens.Lens' User (Prelude.Maybe [Prelude.Text])
user_aCLNames :: Lens' User (Maybe [Text])
user_aCLNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe [Text]
aCLNames :: Maybe [Text]
$sel:aCLNames:User' :: User -> Maybe [Text]
aCLNames} -> Maybe [Text]
aCLNames) (\s :: User
s@User' {} Maybe [Text]
a -> User
s {$sel:aCLNames:User' :: Maybe [Text]
aCLNames = Maybe [Text]
a} :: User) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
user_arn :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_arn :: Lens' User (Maybe Text)
user_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
arn :: Maybe Text
$sel:arn:User' :: User -> Maybe Text
arn} -> Maybe Text
arn) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:arn:User' :: Maybe Text
arn = Maybe Text
a} :: User)
user_accessString :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_accessString :: Lens' User (Maybe Text)
user_accessString = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
accessString :: Maybe Text
$sel:accessString:User' :: User -> Maybe Text
accessString} -> Maybe Text
accessString) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:accessString:User' :: Maybe Text
accessString = Maybe Text
a} :: User)
user_authentication :: Lens.Lens' User (Prelude.Maybe Authentication)
user_authentication :: Lens' User (Maybe Authentication)
user_authentication = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Authentication
authentication :: Maybe Authentication
$sel:authentication:User' :: User -> Maybe Authentication
authentication} -> Maybe Authentication
authentication) (\s :: User
s@User' {} Maybe Authentication
a -> User
s {$sel:authentication:User' :: Maybe Authentication
authentication = Maybe Authentication
a} :: User)
user_minimumEngineVersion :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_minimumEngineVersion :: Lens' User (Maybe Text)
user_minimumEngineVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
minimumEngineVersion :: Maybe Text
$sel:minimumEngineVersion:User' :: User -> Maybe Text
minimumEngineVersion} -> Maybe Text
minimumEngineVersion) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:minimumEngineVersion:User' :: Maybe Text
minimumEngineVersion = Maybe Text
a} :: User)
user_name :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_name :: Lens' User (Maybe Text)
user_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
name :: Maybe Text
$sel:name:User' :: User -> Maybe Text
name} -> Maybe Text
name) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:name:User' :: Maybe Text
name = Maybe Text
a} :: User)
user_status :: Lens.Lens' User (Prelude.Maybe Prelude.Text)
user_status :: Lens' User (Maybe Text)
user_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\User' {Maybe Text
status :: Maybe Text
$sel:status:User' :: User -> Maybe Text
status} -> Maybe Text
status) (\s :: User
s@User' {} Maybe Text
a -> User
s {$sel:status:User' :: Maybe Text
status = Maybe Text
a} :: User)
instance Data.FromJSON User where
parseJSON :: Value -> Parser User
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"User"
( \Object
x ->
Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Authentication
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> User
User'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ACLNames" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ARN")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AccessString")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Authentication")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MinimumEngineVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
)
instance Prelude.Hashable User where
hashWithSalt :: Int -> User -> Int
hashWithSalt Int
_salt User' {Maybe [Text]
Maybe Text
Maybe Authentication
status :: Maybe Text
name :: Maybe Text
minimumEngineVersion :: Maybe Text
authentication :: Maybe Authentication
accessString :: Maybe Text
arn :: Maybe Text
aCLNames :: Maybe [Text]
$sel:status:User' :: User -> Maybe Text
$sel:name:User' :: User -> Maybe Text
$sel:minimumEngineVersion:User' :: User -> Maybe Text
$sel:authentication:User' :: User -> Maybe Authentication
$sel:accessString:User' :: User -> Maybe Text
$sel:arn:User' :: User -> Maybe Text
$sel:aCLNames:User' :: User -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
aCLNames
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accessString
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Authentication
authentication
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
minimumEngineVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
instance Prelude.NFData User where
rnf :: User -> ()
rnf User' {Maybe [Text]
Maybe Text
Maybe Authentication
status :: Maybe Text
name :: Maybe Text
minimumEngineVersion :: Maybe Text
authentication :: Maybe Authentication
accessString :: Maybe Text
arn :: Maybe Text
aCLNames :: Maybe [Text]
$sel:status:User' :: User -> Maybe Text
$sel:name:User' :: User -> Maybe Text
$sel:minimumEngineVersion:User' :: User -> Maybe Text
$sel:authentication:User' :: User -> Maybe Authentication
$sel:accessString:User' :: User -> Maybe Text
$sel:arn:User' :: User -> Maybe Text
$sel:aCLNames:User' :: User -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
aCLNames
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accessString
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Authentication
authentication
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
minimumEngineVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status