{-# 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.Batch.Types.ArrayPropertiesDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ArrayPropertiesDetail = ArrayPropertiesDetail'
{
ArrayPropertiesDetail -> Maybe Int
size :: Prelude.Maybe Prelude.Int,
ArrayPropertiesDetail -> Maybe (HashMap Text Int)
statusSummary :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Int),
ArrayPropertiesDetail -> Maybe Int
index :: Prelude.Maybe Prelude.Int
}
deriving (ArrayPropertiesDetail -> ArrayPropertiesDetail -> Bool
(ArrayPropertiesDetail -> ArrayPropertiesDetail -> Bool)
-> (ArrayPropertiesDetail -> ArrayPropertiesDetail -> Bool)
-> Eq ArrayPropertiesDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArrayPropertiesDetail -> ArrayPropertiesDetail -> Bool
$c/= :: ArrayPropertiesDetail -> ArrayPropertiesDetail -> Bool
== :: ArrayPropertiesDetail -> ArrayPropertiesDetail -> Bool
$c== :: ArrayPropertiesDetail -> ArrayPropertiesDetail -> Bool
Prelude.Eq, ReadPrec [ArrayPropertiesDetail]
ReadPrec ArrayPropertiesDetail
Int -> ReadS ArrayPropertiesDetail
ReadS [ArrayPropertiesDetail]
(Int -> ReadS ArrayPropertiesDetail)
-> ReadS [ArrayPropertiesDetail]
-> ReadPrec ArrayPropertiesDetail
-> ReadPrec [ArrayPropertiesDetail]
-> Read ArrayPropertiesDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ArrayPropertiesDetail]
$creadListPrec :: ReadPrec [ArrayPropertiesDetail]
readPrec :: ReadPrec ArrayPropertiesDetail
$creadPrec :: ReadPrec ArrayPropertiesDetail
readList :: ReadS [ArrayPropertiesDetail]
$creadList :: ReadS [ArrayPropertiesDetail]
readsPrec :: Int -> ReadS ArrayPropertiesDetail
$creadsPrec :: Int -> ReadS ArrayPropertiesDetail
Prelude.Read, Int -> ArrayPropertiesDetail -> ShowS
[ArrayPropertiesDetail] -> ShowS
ArrayPropertiesDetail -> String
(Int -> ArrayPropertiesDetail -> ShowS)
-> (ArrayPropertiesDetail -> String)
-> ([ArrayPropertiesDetail] -> ShowS)
-> Show ArrayPropertiesDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArrayPropertiesDetail] -> ShowS
$cshowList :: [ArrayPropertiesDetail] -> ShowS
show :: ArrayPropertiesDetail -> String
$cshow :: ArrayPropertiesDetail -> String
showsPrec :: Int -> ArrayPropertiesDetail -> ShowS
$cshowsPrec :: Int -> ArrayPropertiesDetail -> ShowS
Prelude.Show, (forall x. ArrayPropertiesDetail -> Rep ArrayPropertiesDetail x)
-> (forall x. Rep ArrayPropertiesDetail x -> ArrayPropertiesDetail)
-> Generic ArrayPropertiesDetail
forall x. Rep ArrayPropertiesDetail x -> ArrayPropertiesDetail
forall x. ArrayPropertiesDetail -> Rep ArrayPropertiesDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ArrayPropertiesDetail x -> ArrayPropertiesDetail
$cfrom :: forall x. ArrayPropertiesDetail -> Rep ArrayPropertiesDetail x
Prelude.Generic)
newArrayPropertiesDetail ::
ArrayPropertiesDetail
newArrayPropertiesDetail :: ArrayPropertiesDetail
newArrayPropertiesDetail =
ArrayPropertiesDetail' :: Maybe Int
-> Maybe (HashMap Text Int) -> Maybe Int -> ArrayPropertiesDetail
ArrayPropertiesDetail'
{ $sel:size:ArrayPropertiesDetail' :: Maybe Int
size = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:statusSummary:ArrayPropertiesDetail' :: Maybe (HashMap Text Int)
statusSummary = Maybe (HashMap Text Int)
forall a. Maybe a
Prelude.Nothing,
$sel:index:ArrayPropertiesDetail' :: Maybe Int
index = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
arrayPropertiesDetail_size :: Lens.Lens' ArrayPropertiesDetail (Prelude.Maybe Prelude.Int)
arrayPropertiesDetail_size :: (Maybe Int -> f (Maybe Int))
-> ArrayPropertiesDetail -> f ArrayPropertiesDetail
arrayPropertiesDetail_size = (ArrayPropertiesDetail -> Maybe Int)
-> (ArrayPropertiesDetail -> Maybe Int -> ArrayPropertiesDetail)
-> Lens
ArrayPropertiesDetail ArrayPropertiesDetail (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArrayPropertiesDetail' {Maybe Int
size :: Maybe Int
$sel:size:ArrayPropertiesDetail' :: ArrayPropertiesDetail -> Maybe Int
size} -> Maybe Int
size) (\s :: ArrayPropertiesDetail
s@ArrayPropertiesDetail' {} Maybe Int
a -> ArrayPropertiesDetail
s {$sel:size:ArrayPropertiesDetail' :: Maybe Int
size = Maybe Int
a} :: ArrayPropertiesDetail)
arrayPropertiesDetail_statusSummary :: Lens.Lens' ArrayPropertiesDetail (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Int))
arrayPropertiesDetail_statusSummary :: (Maybe (HashMap Text Int) -> f (Maybe (HashMap Text Int)))
-> ArrayPropertiesDetail -> f ArrayPropertiesDetail
arrayPropertiesDetail_statusSummary = (ArrayPropertiesDetail -> Maybe (HashMap Text Int))
-> (ArrayPropertiesDetail
-> Maybe (HashMap Text Int) -> ArrayPropertiesDetail)
-> Lens
ArrayPropertiesDetail
ArrayPropertiesDetail
(Maybe (HashMap Text Int))
(Maybe (HashMap Text Int))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArrayPropertiesDetail' {Maybe (HashMap Text Int)
statusSummary :: Maybe (HashMap Text Int)
$sel:statusSummary:ArrayPropertiesDetail' :: ArrayPropertiesDetail -> Maybe (HashMap Text Int)
statusSummary} -> Maybe (HashMap Text Int)
statusSummary) (\s :: ArrayPropertiesDetail
s@ArrayPropertiesDetail' {} Maybe (HashMap Text Int)
a -> ArrayPropertiesDetail
s {$sel:statusSummary:ArrayPropertiesDetail' :: Maybe (HashMap Text Int)
statusSummary = Maybe (HashMap Text Int)
a} :: ArrayPropertiesDetail) ((Maybe (HashMap Text Int) -> f (Maybe (HashMap Text Int)))
-> ArrayPropertiesDetail -> f ArrayPropertiesDetail)
-> ((Maybe (HashMap Text Int) -> f (Maybe (HashMap Text Int)))
-> Maybe (HashMap Text Int) -> f (Maybe (HashMap Text Int)))
-> (Maybe (HashMap Text Int) -> f (Maybe (HashMap Text Int)))
-> ArrayPropertiesDetail
-> f ArrayPropertiesDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Int)
(HashMap Text Int)
(HashMap Text Int)
(HashMap Text Int)
-> Iso
(Maybe (HashMap Text Int))
(Maybe (HashMap Text Int))
(Maybe (HashMap Text Int))
(Maybe (HashMap Text Int))
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 AnIso
(HashMap Text Int)
(HashMap Text Int)
(HashMap Text Int)
(HashMap Text Int)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
arrayPropertiesDetail_index :: Lens.Lens' ArrayPropertiesDetail (Prelude.Maybe Prelude.Int)
arrayPropertiesDetail_index :: (Maybe Int -> f (Maybe Int))
-> ArrayPropertiesDetail -> f ArrayPropertiesDetail
arrayPropertiesDetail_index = (ArrayPropertiesDetail -> Maybe Int)
-> (ArrayPropertiesDetail -> Maybe Int -> ArrayPropertiesDetail)
-> Lens
ArrayPropertiesDetail ArrayPropertiesDetail (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArrayPropertiesDetail' {Maybe Int
index :: Maybe Int
$sel:index:ArrayPropertiesDetail' :: ArrayPropertiesDetail -> Maybe Int
index} -> Maybe Int
index) (\s :: ArrayPropertiesDetail
s@ArrayPropertiesDetail' {} Maybe Int
a -> ArrayPropertiesDetail
s {$sel:index:ArrayPropertiesDetail' :: Maybe Int
index = Maybe Int
a} :: ArrayPropertiesDetail)
instance Core.FromJSON ArrayPropertiesDetail where
parseJSON :: Value -> Parser ArrayPropertiesDetail
parseJSON =
String
-> (Object -> Parser ArrayPropertiesDetail)
-> Value
-> Parser ArrayPropertiesDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ArrayPropertiesDetail"
( \Object
x ->
Maybe Int
-> Maybe (HashMap Text Int) -> Maybe Int -> ArrayPropertiesDetail
ArrayPropertiesDetail'
(Maybe Int
-> Maybe (HashMap Text Int) -> Maybe Int -> ArrayPropertiesDetail)
-> Parser (Maybe Int)
-> Parser
(Maybe (HashMap Text Int) -> Maybe Int -> ArrayPropertiesDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"size")
Parser
(Maybe (HashMap Text Int) -> Maybe Int -> ArrayPropertiesDetail)
-> Parser (Maybe (HashMap Text Int))
-> Parser (Maybe Int -> ArrayPropertiesDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Int)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statusSummary" Parser (Maybe (Maybe (HashMap Text Int)))
-> Maybe (HashMap Text Int) -> Parser (Maybe (HashMap Text Int))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Int)
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Int -> ArrayPropertiesDetail)
-> Parser (Maybe Int) -> Parser ArrayPropertiesDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"index")
)
instance Prelude.Hashable ArrayPropertiesDetail
instance Prelude.NFData ArrayPropertiesDetail