{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SnapshotLimits = SnapshotLimits'
{
SnapshotLimits -> Maybe Bool
manualSnapshotsLimitReached :: Prelude.Maybe Prelude.Bool,
SnapshotLimits -> Maybe Natural
manualSnapshotsCurrentCount :: Prelude.Maybe Prelude.Natural,
SnapshotLimits -> Maybe Natural
manualSnapshotsLimit :: Prelude.Maybe Prelude.Natural
}
deriving (SnapshotLimits -> SnapshotLimits -> Bool
(SnapshotLimits -> SnapshotLimits -> Bool)
-> (SnapshotLimits -> SnapshotLimits -> Bool) -> Eq SnapshotLimits
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]
(Int -> ReadS SnapshotLimits)
-> ReadS [SnapshotLimits]
-> ReadPrec SnapshotLimits
-> ReadPrec [SnapshotLimits]
-> Read 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
(Int -> SnapshotLimits -> ShowS)
-> (SnapshotLimits -> String)
-> ([SnapshotLimits] -> ShowS)
-> Show SnapshotLimits
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. SnapshotLimits -> Rep SnapshotLimits x)
-> (forall x. Rep SnapshotLimits x -> SnapshotLimits)
-> Generic SnapshotLimits
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' :: Maybe Bool -> Maybe Natural -> Maybe Natural -> SnapshotLimits
SnapshotLimits'
{ $sel:manualSnapshotsLimitReached:SnapshotLimits' :: Maybe Bool
manualSnapshotsLimitReached =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:manualSnapshotsCurrentCount:SnapshotLimits' :: Maybe Natural
manualSnapshotsCurrentCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:manualSnapshotsLimit:SnapshotLimits' :: Maybe Natural
manualSnapshotsLimit = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
snapshotLimits_manualSnapshotsLimitReached :: Lens.Lens' SnapshotLimits (Prelude.Maybe Prelude.Bool)
snapshotLimits_manualSnapshotsLimitReached :: (Maybe Bool -> f (Maybe Bool))
-> SnapshotLimits -> f SnapshotLimits
snapshotLimits_manualSnapshotsLimitReached = (SnapshotLimits -> Maybe Bool)
-> (SnapshotLimits -> Maybe Bool -> SnapshotLimits)
-> Lens SnapshotLimits SnapshotLimits (Maybe Bool) (Maybe Bool)
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)
snapshotLimits_manualSnapshotsCurrentCount :: Lens.Lens' SnapshotLimits (Prelude.Maybe Prelude.Natural)
snapshotLimits_manualSnapshotsCurrentCount :: (Maybe Natural -> f (Maybe Natural))
-> SnapshotLimits -> f SnapshotLimits
snapshotLimits_manualSnapshotsCurrentCount = (SnapshotLimits -> Maybe Natural)
-> (SnapshotLimits -> Maybe Natural -> SnapshotLimits)
-> Lens
SnapshotLimits SnapshotLimits (Maybe Natural) (Maybe Natural)
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 :: (Maybe Natural -> f (Maybe Natural))
-> SnapshotLimits -> f SnapshotLimits
snapshotLimits_manualSnapshotsLimit = (SnapshotLimits -> Maybe Natural)
-> (SnapshotLimits -> Maybe Natural -> SnapshotLimits)
-> Lens
SnapshotLimits SnapshotLimits (Maybe Natural) (Maybe Natural)
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)
instance Core.FromJSON SnapshotLimits where
parseJSON :: Value -> Parser SnapshotLimits
parseJSON =
String
-> (Object -> Parser SnapshotLimits)
-> Value
-> Parser SnapshotLimits
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SnapshotLimits"
( \Object
x ->
Maybe Bool -> Maybe Natural -> Maybe Natural -> SnapshotLimits
SnapshotLimits'
(Maybe Bool -> Maybe Natural -> Maybe Natural -> SnapshotLimits)
-> Parser (Maybe Bool)
-> Parser (Maybe Natural -> Maybe Natural -> SnapshotLimits)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ManualSnapshotsLimitReached")
Parser (Maybe Natural -> Maybe Natural -> SnapshotLimits)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> SnapshotLimits)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ManualSnapshotsCurrentCount")
Parser (Maybe Natural -> SnapshotLimits)
-> Parser (Maybe Natural) -> Parser SnapshotLimits
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ManualSnapshotsLimit")
)
instance Prelude.Hashable SnapshotLimits
instance Prelude.NFData SnapshotLimits