{-# 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.DirectoryService.Types.SnapshotLimits 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 SnapshotLimits = SnapshotLimits'
{
SnapshotLimits -> Maybe Natural
manualSnapshotsCurrentCount :: Prelude.Maybe Prelude.Natural,
SnapshotLimits -> Maybe Natural
manualSnapshotsLimit :: Prelude.Maybe Prelude.Natural,
SnapshotLimits -> Maybe Bool
manualSnapshotsLimitReached :: Prelude.Maybe Prelude.Bool
}
deriving (SnapshotLimits -> SnapshotLimits -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SnapshotLimits -> SnapshotLimits -> Bool
$c/= :: SnapshotLimits -> SnapshotLimits -> Bool
== :: SnapshotLimits -> SnapshotLimits -> Bool
$c== :: SnapshotLimits -> SnapshotLimits -> Bool
Prelude.Eq, ReadPrec [SnapshotLimits]
ReadPrec SnapshotLimits
Int -> ReadS SnapshotLimits
ReadS [SnapshotLimits]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SnapshotLimits]
$creadListPrec :: ReadPrec [SnapshotLimits]
readPrec :: ReadPrec SnapshotLimits
$creadPrec :: ReadPrec SnapshotLimits
readList :: ReadS [SnapshotLimits]
$creadList :: ReadS [SnapshotLimits]
readsPrec :: Int -> ReadS SnapshotLimits
$creadsPrec :: Int -> ReadS SnapshotLimits
Prelude.Read, Int -> SnapshotLimits -> ShowS
[SnapshotLimits] -> ShowS
SnapshotLimits -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SnapshotLimits] -> ShowS
$cshowList :: [SnapshotLimits] -> ShowS
show :: SnapshotLimits -> String
$cshow :: SnapshotLimits -> String
showsPrec :: Int -> SnapshotLimits -> ShowS
$cshowsPrec :: Int -> SnapshotLimits -> ShowS
Prelude.Show, forall x. Rep SnapshotLimits x -> SnapshotLimits
forall x. SnapshotLimits -> Rep SnapshotLimits x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SnapshotLimits x -> SnapshotLimits
$cfrom :: forall x. SnapshotLimits -> Rep SnapshotLimits x
Prelude.Generic)
newSnapshotLimits ::
SnapshotLimits
newSnapshotLimits :: SnapshotLimits
newSnapshotLimits =
SnapshotLimits'
{ $sel:manualSnapshotsCurrentCount:SnapshotLimits' :: Maybe Natural
manualSnapshotsCurrentCount =
forall a. Maybe a
Prelude.Nothing,
$sel:manualSnapshotsLimit:SnapshotLimits' :: Maybe Natural
manualSnapshotsLimit = forall a. Maybe a
Prelude.Nothing,
$sel:manualSnapshotsLimitReached:SnapshotLimits' :: Maybe Bool
manualSnapshotsLimitReached = forall a. Maybe a
Prelude.Nothing
}
snapshotLimits_manualSnapshotsCurrentCount :: Lens.Lens' SnapshotLimits (Prelude.Maybe Prelude.Natural)
snapshotLimits_manualSnapshotsCurrentCount :: Lens' SnapshotLimits (Maybe Natural)
snapshotLimits_manualSnapshotsCurrentCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotLimits' {Maybe Natural
manualSnapshotsCurrentCount :: Maybe Natural
$sel:manualSnapshotsCurrentCount:SnapshotLimits' :: SnapshotLimits -> Maybe Natural
manualSnapshotsCurrentCount} -> Maybe Natural
manualSnapshotsCurrentCount) (\s :: SnapshotLimits
s@SnapshotLimits' {} Maybe Natural
a -> SnapshotLimits
s {$sel:manualSnapshotsCurrentCount:SnapshotLimits' :: Maybe Natural
manualSnapshotsCurrentCount = Maybe Natural
a} :: SnapshotLimits)
snapshotLimits_manualSnapshotsLimit :: Lens.Lens' SnapshotLimits (Prelude.Maybe Prelude.Natural)
snapshotLimits_manualSnapshotsLimit :: Lens' SnapshotLimits (Maybe Natural)
snapshotLimits_manualSnapshotsLimit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotLimits' {Maybe Natural
manualSnapshotsLimit :: Maybe Natural
$sel:manualSnapshotsLimit:SnapshotLimits' :: SnapshotLimits -> Maybe Natural
manualSnapshotsLimit} -> Maybe Natural
manualSnapshotsLimit) (\s :: SnapshotLimits
s@SnapshotLimits' {} Maybe Natural
a -> SnapshotLimits
s {$sel:manualSnapshotsLimit:SnapshotLimits' :: Maybe Natural
manualSnapshotsLimit = Maybe Natural
a} :: SnapshotLimits)
snapshotLimits_manualSnapshotsLimitReached :: Lens.Lens' SnapshotLimits (Prelude.Maybe Prelude.Bool)
snapshotLimits_manualSnapshotsLimitReached :: Lens' SnapshotLimits (Maybe Bool)
snapshotLimits_manualSnapshotsLimitReached = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapshotLimits' {Maybe Bool
manualSnapshotsLimitReached :: Maybe Bool
$sel:manualSnapshotsLimitReached:SnapshotLimits' :: SnapshotLimits -> Maybe Bool
manualSnapshotsLimitReached} -> Maybe Bool
manualSnapshotsLimitReached) (\s :: SnapshotLimits
s@SnapshotLimits' {} Maybe Bool
a -> SnapshotLimits
s {$sel:manualSnapshotsLimitReached:SnapshotLimits' :: Maybe Bool
manualSnapshotsLimitReached = Maybe Bool
a} :: SnapshotLimits)
instance Data.FromJSON SnapshotLimits where
parseJSON :: Value -> Parser SnapshotLimits
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SnapshotLimits"
( \Object
x ->
Maybe Natural -> Maybe Natural -> Maybe Bool -> SnapshotLimits
SnapshotLimits'
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
"ManualSnapshotsCurrentCount")
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
"ManualSnapshotsLimit")
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
"ManualSnapshotsLimitReached")
)
instance Prelude.Hashable SnapshotLimits where
hashWithSalt :: Int -> SnapshotLimits -> Int
hashWithSalt Int
_salt SnapshotLimits' {Maybe Bool
Maybe Natural
manualSnapshotsLimitReached :: Maybe Bool
manualSnapshotsLimit :: Maybe Natural
manualSnapshotsCurrentCount :: Maybe Natural
$sel:manualSnapshotsLimitReached:SnapshotLimits' :: SnapshotLimits -> Maybe Bool
$sel:manualSnapshotsLimit:SnapshotLimits' :: SnapshotLimits -> Maybe Natural
$sel:manualSnapshotsCurrentCount:SnapshotLimits' :: SnapshotLimits -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
manualSnapshotsCurrentCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
manualSnapshotsLimit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
manualSnapshotsLimitReached
instance Prelude.NFData SnapshotLimits where
rnf :: SnapshotLimits -> ()
rnf SnapshotLimits' {Maybe Bool
Maybe Natural
manualSnapshotsLimitReached :: Maybe Bool
manualSnapshotsLimit :: Maybe Natural
manualSnapshotsCurrentCount :: Maybe Natural
$sel:manualSnapshotsLimitReached:SnapshotLimits' :: SnapshotLimits -> Maybe Bool
$sel:manualSnapshotsLimit:SnapshotLimits' :: SnapshotLimits -> Maybe Natural
$sel:manualSnapshotsCurrentCount:SnapshotLimits' :: SnapshotLimits -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
manualSnapshotsCurrentCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
manualSnapshotsLimit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
manualSnapshotsLimitReached