{-# 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.Pi.Types.DimensionKeyDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pi.Types.DetailStatus
import qualified Amazonka.Prelude as Prelude
data DimensionKeyDetail = DimensionKeyDetail'
{
DimensionKeyDetail -> Maybe DetailStatus
status :: Prelude.Maybe DetailStatus,
DimensionKeyDetail -> Maybe Text
dimension :: Prelude.Maybe Prelude.Text,
DimensionKeyDetail -> Maybe Text
value :: Prelude.Maybe Prelude.Text
}
deriving (DimensionKeyDetail -> DimensionKeyDetail -> Bool
(DimensionKeyDetail -> DimensionKeyDetail -> Bool)
-> (DimensionKeyDetail -> DimensionKeyDetail -> Bool)
-> Eq DimensionKeyDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DimensionKeyDetail -> DimensionKeyDetail -> Bool
$c/= :: DimensionKeyDetail -> DimensionKeyDetail -> Bool
== :: DimensionKeyDetail -> DimensionKeyDetail -> Bool
$c== :: DimensionKeyDetail -> DimensionKeyDetail -> Bool
Prelude.Eq, ReadPrec [DimensionKeyDetail]
ReadPrec DimensionKeyDetail
Int -> ReadS DimensionKeyDetail
ReadS [DimensionKeyDetail]
(Int -> ReadS DimensionKeyDetail)
-> ReadS [DimensionKeyDetail]
-> ReadPrec DimensionKeyDetail
-> ReadPrec [DimensionKeyDetail]
-> Read DimensionKeyDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DimensionKeyDetail]
$creadListPrec :: ReadPrec [DimensionKeyDetail]
readPrec :: ReadPrec DimensionKeyDetail
$creadPrec :: ReadPrec DimensionKeyDetail
readList :: ReadS [DimensionKeyDetail]
$creadList :: ReadS [DimensionKeyDetail]
readsPrec :: Int -> ReadS DimensionKeyDetail
$creadsPrec :: Int -> ReadS DimensionKeyDetail
Prelude.Read, Int -> DimensionKeyDetail -> ShowS
[DimensionKeyDetail] -> ShowS
DimensionKeyDetail -> String
(Int -> DimensionKeyDetail -> ShowS)
-> (DimensionKeyDetail -> String)
-> ([DimensionKeyDetail] -> ShowS)
-> Show DimensionKeyDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DimensionKeyDetail] -> ShowS
$cshowList :: [DimensionKeyDetail] -> ShowS
show :: DimensionKeyDetail -> String
$cshow :: DimensionKeyDetail -> String
showsPrec :: Int -> DimensionKeyDetail -> ShowS
$cshowsPrec :: Int -> DimensionKeyDetail -> ShowS
Prelude.Show, (forall x. DimensionKeyDetail -> Rep DimensionKeyDetail x)
-> (forall x. Rep DimensionKeyDetail x -> DimensionKeyDetail)
-> Generic DimensionKeyDetail
forall x. Rep DimensionKeyDetail x -> DimensionKeyDetail
forall x. DimensionKeyDetail -> Rep DimensionKeyDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DimensionKeyDetail x -> DimensionKeyDetail
$cfrom :: forall x. DimensionKeyDetail -> Rep DimensionKeyDetail x
Prelude.Generic)
newDimensionKeyDetail ::
DimensionKeyDetail
newDimensionKeyDetail :: DimensionKeyDetail
newDimensionKeyDetail =
DimensionKeyDetail' :: Maybe DetailStatus
-> Maybe Text -> Maybe Text -> DimensionKeyDetail
DimensionKeyDetail'
{ $sel:status:DimensionKeyDetail' :: Maybe DetailStatus
status = Maybe DetailStatus
forall a. Maybe a
Prelude.Nothing,
$sel:dimension:DimensionKeyDetail' :: Maybe Text
dimension = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:value:DimensionKeyDetail' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dimensionKeyDetail_status :: Lens.Lens' DimensionKeyDetail (Prelude.Maybe DetailStatus)
dimensionKeyDetail_status :: (Maybe DetailStatus -> f (Maybe DetailStatus))
-> DimensionKeyDetail -> f DimensionKeyDetail
dimensionKeyDetail_status = (DimensionKeyDetail -> Maybe DetailStatus)
-> (DimensionKeyDetail -> Maybe DetailStatus -> DimensionKeyDetail)
-> Lens
DimensionKeyDetail
DimensionKeyDetail
(Maybe DetailStatus)
(Maybe DetailStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DimensionKeyDetail' {Maybe DetailStatus
status :: Maybe DetailStatus
$sel:status:DimensionKeyDetail' :: DimensionKeyDetail -> Maybe DetailStatus
status} -> Maybe DetailStatus
status) (\s :: DimensionKeyDetail
s@DimensionKeyDetail' {} Maybe DetailStatus
a -> DimensionKeyDetail
s {$sel:status:DimensionKeyDetail' :: Maybe DetailStatus
status = Maybe DetailStatus
a} :: DimensionKeyDetail)
dimensionKeyDetail_dimension :: Lens.Lens' DimensionKeyDetail (Prelude.Maybe Prelude.Text)
dimensionKeyDetail_dimension :: (Maybe Text -> f (Maybe Text))
-> DimensionKeyDetail -> f DimensionKeyDetail
dimensionKeyDetail_dimension = (DimensionKeyDetail -> Maybe Text)
-> (DimensionKeyDetail -> Maybe Text -> DimensionKeyDetail)
-> Lens
DimensionKeyDetail DimensionKeyDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DimensionKeyDetail' {Maybe Text
dimension :: Maybe Text
$sel:dimension:DimensionKeyDetail' :: DimensionKeyDetail -> Maybe Text
dimension} -> Maybe Text
dimension) (\s :: DimensionKeyDetail
s@DimensionKeyDetail' {} Maybe Text
a -> DimensionKeyDetail
s {$sel:dimension:DimensionKeyDetail' :: Maybe Text
dimension = Maybe Text
a} :: DimensionKeyDetail)
dimensionKeyDetail_value :: Lens.Lens' DimensionKeyDetail (Prelude.Maybe Prelude.Text)
dimensionKeyDetail_value :: (Maybe Text -> f (Maybe Text))
-> DimensionKeyDetail -> f DimensionKeyDetail
dimensionKeyDetail_value = (DimensionKeyDetail -> Maybe Text)
-> (DimensionKeyDetail -> Maybe Text -> DimensionKeyDetail)
-> Lens
DimensionKeyDetail DimensionKeyDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DimensionKeyDetail' {Maybe Text
value :: Maybe Text
$sel:value:DimensionKeyDetail' :: DimensionKeyDetail -> Maybe Text
value} -> Maybe Text
value) (\s :: DimensionKeyDetail
s@DimensionKeyDetail' {} Maybe Text
a -> DimensionKeyDetail
s {$sel:value:DimensionKeyDetail' :: Maybe Text
value = Maybe Text
a} :: DimensionKeyDetail)
instance Core.FromJSON DimensionKeyDetail where
parseJSON :: Value -> Parser DimensionKeyDetail
parseJSON =
String
-> (Object -> Parser DimensionKeyDetail)
-> Value
-> Parser DimensionKeyDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DimensionKeyDetail"
( \Object
x ->
Maybe DetailStatus
-> Maybe Text -> Maybe Text -> DimensionKeyDetail
DimensionKeyDetail'
(Maybe DetailStatus
-> Maybe Text -> Maybe Text -> DimensionKeyDetail)
-> Parser (Maybe DetailStatus)
-> Parser (Maybe Text -> Maybe Text -> DimensionKeyDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DetailStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser (Maybe Text -> Maybe Text -> DimensionKeyDetail)
-> Parser (Maybe Text) -> Parser (Maybe Text -> DimensionKeyDetail)
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
"Dimension")
Parser (Maybe Text -> DimensionKeyDetail)
-> Parser (Maybe Text) -> Parser DimensionKeyDetail
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
"Value")
)
instance Prelude.Hashable DimensionKeyDetail
instance Prelude.NFData DimensionKeyDetail