{-# 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.Glacier.Types.ProvisionedCapacityDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProvisionedCapacityDescription = ProvisionedCapacityDescription'
{
ProvisionedCapacityDescription -> Maybe Text
capacityId :: Prelude.Maybe Prelude.Text,
ProvisionedCapacityDescription -> Maybe Text
startDate :: Prelude.Maybe Prelude.Text,
ProvisionedCapacityDescription -> Maybe Text
expirationDate :: Prelude.Maybe Prelude.Text
}
deriving (ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool
(ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool)
-> (ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool)
-> Eq ProvisionedCapacityDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool
$c/= :: ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool
== :: ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool
$c== :: ProvisionedCapacityDescription
-> ProvisionedCapacityDescription -> Bool
Prelude.Eq, ReadPrec [ProvisionedCapacityDescription]
ReadPrec ProvisionedCapacityDescription
Int -> ReadS ProvisionedCapacityDescription
ReadS [ProvisionedCapacityDescription]
(Int -> ReadS ProvisionedCapacityDescription)
-> ReadS [ProvisionedCapacityDescription]
-> ReadPrec ProvisionedCapacityDescription
-> ReadPrec [ProvisionedCapacityDescription]
-> Read ProvisionedCapacityDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProvisionedCapacityDescription]
$creadListPrec :: ReadPrec [ProvisionedCapacityDescription]
readPrec :: ReadPrec ProvisionedCapacityDescription
$creadPrec :: ReadPrec ProvisionedCapacityDescription
readList :: ReadS [ProvisionedCapacityDescription]
$creadList :: ReadS [ProvisionedCapacityDescription]
readsPrec :: Int -> ReadS ProvisionedCapacityDescription
$creadsPrec :: Int -> ReadS ProvisionedCapacityDescription
Prelude.Read, Int -> ProvisionedCapacityDescription -> ShowS
[ProvisionedCapacityDescription] -> ShowS
ProvisionedCapacityDescription -> String
(Int -> ProvisionedCapacityDescription -> ShowS)
-> (ProvisionedCapacityDescription -> String)
-> ([ProvisionedCapacityDescription] -> ShowS)
-> Show ProvisionedCapacityDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProvisionedCapacityDescription] -> ShowS
$cshowList :: [ProvisionedCapacityDescription] -> ShowS
show :: ProvisionedCapacityDescription -> String
$cshow :: ProvisionedCapacityDescription -> String
showsPrec :: Int -> ProvisionedCapacityDescription -> ShowS
$cshowsPrec :: Int -> ProvisionedCapacityDescription -> ShowS
Prelude.Show, (forall x.
ProvisionedCapacityDescription
-> Rep ProvisionedCapacityDescription x)
-> (forall x.
Rep ProvisionedCapacityDescription x
-> ProvisionedCapacityDescription)
-> Generic ProvisionedCapacityDescription
forall x.
Rep ProvisionedCapacityDescription x
-> ProvisionedCapacityDescription
forall x.
ProvisionedCapacityDescription
-> Rep ProvisionedCapacityDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProvisionedCapacityDescription x
-> ProvisionedCapacityDescription
$cfrom :: forall x.
ProvisionedCapacityDescription
-> Rep ProvisionedCapacityDescription x
Prelude.Generic)
newProvisionedCapacityDescription ::
ProvisionedCapacityDescription
newProvisionedCapacityDescription :: ProvisionedCapacityDescription
newProvisionedCapacityDescription =
ProvisionedCapacityDescription' :: Maybe Text
-> Maybe Text -> Maybe Text -> ProvisionedCapacityDescription
ProvisionedCapacityDescription'
{ $sel:capacityId:ProvisionedCapacityDescription' :: Maybe Text
capacityId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:startDate:ProvisionedCapacityDescription' :: Maybe Text
startDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:expirationDate:ProvisionedCapacityDescription' :: Maybe Text
expirationDate = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
provisionedCapacityDescription_capacityId :: Lens.Lens' ProvisionedCapacityDescription (Prelude.Maybe Prelude.Text)
provisionedCapacityDescription_capacityId :: (Maybe Text -> f (Maybe Text))
-> ProvisionedCapacityDescription
-> f ProvisionedCapacityDescription
provisionedCapacityDescription_capacityId = (ProvisionedCapacityDescription -> Maybe Text)
-> (ProvisionedCapacityDescription
-> Maybe Text -> ProvisionedCapacityDescription)
-> Lens
ProvisionedCapacityDescription
ProvisionedCapacityDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedCapacityDescription' {Maybe Text
capacityId :: Maybe Text
$sel:capacityId:ProvisionedCapacityDescription' :: ProvisionedCapacityDescription -> Maybe Text
capacityId} -> Maybe Text
capacityId) (\s :: ProvisionedCapacityDescription
s@ProvisionedCapacityDescription' {} Maybe Text
a -> ProvisionedCapacityDescription
s {$sel:capacityId:ProvisionedCapacityDescription' :: Maybe Text
capacityId = Maybe Text
a} :: ProvisionedCapacityDescription)
provisionedCapacityDescription_startDate :: Lens.Lens' ProvisionedCapacityDescription (Prelude.Maybe Prelude.Text)
provisionedCapacityDescription_startDate :: (Maybe Text -> f (Maybe Text))
-> ProvisionedCapacityDescription
-> f ProvisionedCapacityDescription
provisionedCapacityDescription_startDate = (ProvisionedCapacityDescription -> Maybe Text)
-> (ProvisionedCapacityDescription
-> Maybe Text -> ProvisionedCapacityDescription)
-> Lens
ProvisionedCapacityDescription
ProvisionedCapacityDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedCapacityDescription' {Maybe Text
startDate :: Maybe Text
$sel:startDate:ProvisionedCapacityDescription' :: ProvisionedCapacityDescription -> Maybe Text
startDate} -> Maybe Text
startDate) (\s :: ProvisionedCapacityDescription
s@ProvisionedCapacityDescription' {} Maybe Text
a -> ProvisionedCapacityDescription
s {$sel:startDate:ProvisionedCapacityDescription' :: Maybe Text
startDate = Maybe Text
a} :: ProvisionedCapacityDescription)
provisionedCapacityDescription_expirationDate :: Lens.Lens' ProvisionedCapacityDescription (Prelude.Maybe Prelude.Text)
provisionedCapacityDescription_expirationDate :: (Maybe Text -> f (Maybe Text))
-> ProvisionedCapacityDescription
-> f ProvisionedCapacityDescription
provisionedCapacityDescription_expirationDate = (ProvisionedCapacityDescription -> Maybe Text)
-> (ProvisionedCapacityDescription
-> Maybe Text -> ProvisionedCapacityDescription)
-> Lens
ProvisionedCapacityDescription
ProvisionedCapacityDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProvisionedCapacityDescription' {Maybe Text
expirationDate :: Maybe Text
$sel:expirationDate:ProvisionedCapacityDescription' :: ProvisionedCapacityDescription -> Maybe Text
expirationDate} -> Maybe Text
expirationDate) (\s :: ProvisionedCapacityDescription
s@ProvisionedCapacityDescription' {} Maybe Text
a -> ProvisionedCapacityDescription
s {$sel:expirationDate:ProvisionedCapacityDescription' :: Maybe Text
expirationDate = Maybe Text
a} :: ProvisionedCapacityDescription)
instance Core.FromJSON ProvisionedCapacityDescription where
parseJSON :: Value -> Parser ProvisionedCapacityDescription
parseJSON =
String
-> (Object -> Parser ProvisionedCapacityDescription)
-> Value
-> Parser ProvisionedCapacityDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProvisionedCapacityDescription"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> ProvisionedCapacityDescription
ProvisionedCapacityDescription'
(Maybe Text
-> Maybe Text -> Maybe Text -> ProvisionedCapacityDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> ProvisionedCapacityDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CapacityId")
Parser (Maybe Text -> Maybe Text -> ProvisionedCapacityDescription)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ProvisionedCapacityDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartDate")
Parser (Maybe Text -> ProvisionedCapacityDescription)
-> Parser (Maybe Text) -> Parser ProvisionedCapacityDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExpirationDate")
)
instance
Prelude.Hashable
ProvisionedCapacityDescription
instance
Prelude.NFData
ProvisionedCapacityDescription