{-# 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.Redshift.Types.AccountWithRestoreAccess where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
data AccountWithRestoreAccess = AccountWithRestoreAccess'
{
AccountWithRestoreAccess -> Maybe Text
accountAlias :: Prelude.Maybe Prelude.Text,
AccountWithRestoreAccess -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text
}
deriving (AccountWithRestoreAccess -> AccountWithRestoreAccess -> Bool
(AccountWithRestoreAccess -> AccountWithRestoreAccess -> Bool)
-> (AccountWithRestoreAccess -> AccountWithRestoreAccess -> Bool)
-> Eq AccountWithRestoreAccess
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountWithRestoreAccess -> AccountWithRestoreAccess -> Bool
$c/= :: AccountWithRestoreAccess -> AccountWithRestoreAccess -> Bool
== :: AccountWithRestoreAccess -> AccountWithRestoreAccess -> Bool
$c== :: AccountWithRestoreAccess -> AccountWithRestoreAccess -> Bool
Prelude.Eq, ReadPrec [AccountWithRestoreAccess]
ReadPrec AccountWithRestoreAccess
Int -> ReadS AccountWithRestoreAccess
ReadS [AccountWithRestoreAccess]
(Int -> ReadS AccountWithRestoreAccess)
-> ReadS [AccountWithRestoreAccess]
-> ReadPrec AccountWithRestoreAccess
-> ReadPrec [AccountWithRestoreAccess]
-> Read AccountWithRestoreAccess
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountWithRestoreAccess]
$creadListPrec :: ReadPrec [AccountWithRestoreAccess]
readPrec :: ReadPrec AccountWithRestoreAccess
$creadPrec :: ReadPrec AccountWithRestoreAccess
readList :: ReadS [AccountWithRestoreAccess]
$creadList :: ReadS [AccountWithRestoreAccess]
readsPrec :: Int -> ReadS AccountWithRestoreAccess
$creadsPrec :: Int -> ReadS AccountWithRestoreAccess
Prelude.Read, Int -> AccountWithRestoreAccess -> ShowS
[AccountWithRestoreAccess] -> ShowS
AccountWithRestoreAccess -> String
(Int -> AccountWithRestoreAccess -> ShowS)
-> (AccountWithRestoreAccess -> String)
-> ([AccountWithRestoreAccess] -> ShowS)
-> Show AccountWithRestoreAccess
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountWithRestoreAccess] -> ShowS
$cshowList :: [AccountWithRestoreAccess] -> ShowS
show :: AccountWithRestoreAccess -> String
$cshow :: AccountWithRestoreAccess -> String
showsPrec :: Int -> AccountWithRestoreAccess -> ShowS
$cshowsPrec :: Int -> AccountWithRestoreAccess -> ShowS
Prelude.Show, (forall x.
AccountWithRestoreAccess -> Rep AccountWithRestoreAccess x)
-> (forall x.
Rep AccountWithRestoreAccess x -> AccountWithRestoreAccess)
-> Generic AccountWithRestoreAccess
forall x.
Rep AccountWithRestoreAccess x -> AccountWithRestoreAccess
forall x.
AccountWithRestoreAccess -> Rep AccountWithRestoreAccess x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AccountWithRestoreAccess x -> AccountWithRestoreAccess
$cfrom :: forall x.
AccountWithRestoreAccess -> Rep AccountWithRestoreAccess x
Prelude.Generic)
newAccountWithRestoreAccess ::
AccountWithRestoreAccess
newAccountWithRestoreAccess :: AccountWithRestoreAccess
newAccountWithRestoreAccess =
AccountWithRestoreAccess' :: Maybe Text -> Maybe Text -> AccountWithRestoreAccess
AccountWithRestoreAccess'
{ $sel:accountAlias:AccountWithRestoreAccess' :: Maybe Text
accountAlias =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:AccountWithRestoreAccess' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
accountWithRestoreAccess_accountAlias :: Lens.Lens' AccountWithRestoreAccess (Prelude.Maybe Prelude.Text)
accountWithRestoreAccess_accountAlias :: (Maybe Text -> f (Maybe Text))
-> AccountWithRestoreAccess -> f AccountWithRestoreAccess
accountWithRestoreAccess_accountAlias = (AccountWithRestoreAccess -> Maybe Text)
-> (AccountWithRestoreAccess
-> Maybe Text -> AccountWithRestoreAccess)
-> Lens
AccountWithRestoreAccess
AccountWithRestoreAccess
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountWithRestoreAccess' {Maybe Text
accountAlias :: Maybe Text
$sel:accountAlias:AccountWithRestoreAccess' :: AccountWithRestoreAccess -> Maybe Text
accountAlias} -> Maybe Text
accountAlias) (\s :: AccountWithRestoreAccess
s@AccountWithRestoreAccess' {} Maybe Text
a -> AccountWithRestoreAccess
s {$sel:accountAlias:AccountWithRestoreAccess' :: Maybe Text
accountAlias = Maybe Text
a} :: AccountWithRestoreAccess)
accountWithRestoreAccess_accountId :: Lens.Lens' AccountWithRestoreAccess (Prelude.Maybe Prelude.Text)
accountWithRestoreAccess_accountId :: (Maybe Text -> f (Maybe Text))
-> AccountWithRestoreAccess -> f AccountWithRestoreAccess
accountWithRestoreAccess_accountId = (AccountWithRestoreAccess -> Maybe Text)
-> (AccountWithRestoreAccess
-> Maybe Text -> AccountWithRestoreAccess)
-> Lens
AccountWithRestoreAccess
AccountWithRestoreAccess
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountWithRestoreAccess' {Maybe Text
accountId :: Maybe Text
$sel:accountId:AccountWithRestoreAccess' :: AccountWithRestoreAccess -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: AccountWithRestoreAccess
s@AccountWithRestoreAccess' {} Maybe Text
a -> AccountWithRestoreAccess
s {$sel:accountId:AccountWithRestoreAccess' :: Maybe Text
accountId = Maybe Text
a} :: AccountWithRestoreAccess)
instance Core.FromXML AccountWithRestoreAccess where
parseXML :: [Node] -> Either String AccountWithRestoreAccess
parseXML [Node]
x =
Maybe Text -> Maybe Text -> AccountWithRestoreAccess
AccountWithRestoreAccess'
(Maybe Text -> Maybe Text -> AccountWithRestoreAccess)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> AccountWithRestoreAccess)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AccountAlias")
Either String (Maybe Text -> AccountWithRestoreAccess)
-> Either String (Maybe Text)
-> Either String AccountWithRestoreAccess
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AccountId")
instance Prelude.Hashable AccountWithRestoreAccess
instance Prelude.NFData AccountWithRestoreAccess