{-# 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.AccessAnalyzer.Types.RdsDbClusterSnapshotAttributeValue where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data RdsDbClusterSnapshotAttributeValue = RdsDbClusterSnapshotAttributeValue'
{
RdsDbClusterSnapshotAttributeValue -> Maybe [Text]
accountIds :: Prelude.Maybe [Prelude.Text]
}
deriving (RdsDbClusterSnapshotAttributeValue
-> RdsDbClusterSnapshotAttributeValue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RdsDbClusterSnapshotAttributeValue
-> RdsDbClusterSnapshotAttributeValue -> Bool
$c/= :: RdsDbClusterSnapshotAttributeValue
-> RdsDbClusterSnapshotAttributeValue -> Bool
== :: RdsDbClusterSnapshotAttributeValue
-> RdsDbClusterSnapshotAttributeValue -> Bool
$c== :: RdsDbClusterSnapshotAttributeValue
-> RdsDbClusterSnapshotAttributeValue -> Bool
Prelude.Eq, ReadPrec [RdsDbClusterSnapshotAttributeValue]
ReadPrec RdsDbClusterSnapshotAttributeValue
Int -> ReadS RdsDbClusterSnapshotAttributeValue
ReadS [RdsDbClusterSnapshotAttributeValue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RdsDbClusterSnapshotAttributeValue]
$creadListPrec :: ReadPrec [RdsDbClusterSnapshotAttributeValue]
readPrec :: ReadPrec RdsDbClusterSnapshotAttributeValue
$creadPrec :: ReadPrec RdsDbClusterSnapshotAttributeValue
readList :: ReadS [RdsDbClusterSnapshotAttributeValue]
$creadList :: ReadS [RdsDbClusterSnapshotAttributeValue]
readsPrec :: Int -> ReadS RdsDbClusterSnapshotAttributeValue
$creadsPrec :: Int -> ReadS RdsDbClusterSnapshotAttributeValue
Prelude.Read, Int -> RdsDbClusterSnapshotAttributeValue -> ShowS
[RdsDbClusterSnapshotAttributeValue] -> ShowS
RdsDbClusterSnapshotAttributeValue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RdsDbClusterSnapshotAttributeValue] -> ShowS
$cshowList :: [RdsDbClusterSnapshotAttributeValue] -> ShowS
show :: RdsDbClusterSnapshotAttributeValue -> String
$cshow :: RdsDbClusterSnapshotAttributeValue -> String
showsPrec :: Int -> RdsDbClusterSnapshotAttributeValue -> ShowS
$cshowsPrec :: Int -> RdsDbClusterSnapshotAttributeValue -> ShowS
Prelude.Show, forall x.
Rep RdsDbClusterSnapshotAttributeValue x
-> RdsDbClusterSnapshotAttributeValue
forall x.
RdsDbClusterSnapshotAttributeValue
-> Rep RdsDbClusterSnapshotAttributeValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RdsDbClusterSnapshotAttributeValue x
-> RdsDbClusterSnapshotAttributeValue
$cfrom :: forall x.
RdsDbClusterSnapshotAttributeValue
-> Rep RdsDbClusterSnapshotAttributeValue x
Prelude.Generic)
newRdsDbClusterSnapshotAttributeValue ::
RdsDbClusterSnapshotAttributeValue
newRdsDbClusterSnapshotAttributeValue :: RdsDbClusterSnapshotAttributeValue
newRdsDbClusterSnapshotAttributeValue =
RdsDbClusterSnapshotAttributeValue'
{ $sel:accountIds:RdsDbClusterSnapshotAttributeValue' :: Maybe [Text]
accountIds =
forall a. Maybe a
Prelude.Nothing
}
rdsDbClusterSnapshotAttributeValue_accountIds :: Lens.Lens' RdsDbClusterSnapshotAttributeValue (Prelude.Maybe [Prelude.Text])
rdsDbClusterSnapshotAttributeValue_accountIds :: Lens' RdsDbClusterSnapshotAttributeValue (Maybe [Text])
rdsDbClusterSnapshotAttributeValue_accountIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RdsDbClusterSnapshotAttributeValue' {Maybe [Text]
accountIds :: Maybe [Text]
$sel:accountIds:RdsDbClusterSnapshotAttributeValue' :: RdsDbClusterSnapshotAttributeValue -> Maybe [Text]
accountIds} -> Maybe [Text]
accountIds) (\s :: RdsDbClusterSnapshotAttributeValue
s@RdsDbClusterSnapshotAttributeValue' {} Maybe [Text]
a -> RdsDbClusterSnapshotAttributeValue
s {$sel:accountIds:RdsDbClusterSnapshotAttributeValue' :: Maybe [Text]
accountIds = Maybe [Text]
a} :: RdsDbClusterSnapshotAttributeValue) 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
instance
Data.FromJSON
RdsDbClusterSnapshotAttributeValue
where
parseJSON :: Value -> Parser RdsDbClusterSnapshotAttributeValue
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RdsDbClusterSnapshotAttributeValue"
( \Object
x ->
Maybe [Text] -> RdsDbClusterSnapshotAttributeValue
RdsDbClusterSnapshotAttributeValue'
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
"accountIds" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
RdsDbClusterSnapshotAttributeValue
where
hashWithSalt :: Int -> RdsDbClusterSnapshotAttributeValue -> Int
hashWithSalt
Int
_salt
RdsDbClusterSnapshotAttributeValue' {Maybe [Text]
accountIds :: Maybe [Text]
$sel:accountIds:RdsDbClusterSnapshotAttributeValue' :: RdsDbClusterSnapshotAttributeValue -> Maybe [Text]
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
accountIds
instance
Prelude.NFData
RdsDbClusterSnapshotAttributeValue
where
rnf :: RdsDbClusterSnapshotAttributeValue -> ()
rnf RdsDbClusterSnapshotAttributeValue' {Maybe [Text]
accountIds :: Maybe [Text]
$sel:accountIds:RdsDbClusterSnapshotAttributeValue' :: RdsDbClusterSnapshotAttributeValue -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
accountIds
instance
Data.ToJSON
RdsDbClusterSnapshotAttributeValue
where
toJSON :: RdsDbClusterSnapshotAttributeValue -> Value
toJSON RdsDbClusterSnapshotAttributeValue' {Maybe [Text]
accountIds :: Maybe [Text]
$sel:accountIds:RdsDbClusterSnapshotAttributeValue' :: RdsDbClusterSnapshotAttributeValue -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"accountIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
accountIds]
)