{-# 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.ArrayPropertiesSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ArrayPropertiesSummary = ArrayPropertiesSummary'
{
ArrayPropertiesSummary -> Maybe Int
size :: Prelude.Maybe Prelude.Int,
ArrayPropertiesSummary -> Maybe Int
index :: Prelude.Maybe Prelude.Int
}
deriving (ArrayPropertiesSummary -> ArrayPropertiesSummary -> Bool
(ArrayPropertiesSummary -> ArrayPropertiesSummary -> Bool)
-> (ArrayPropertiesSummary -> ArrayPropertiesSummary -> Bool)
-> Eq ArrayPropertiesSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArrayPropertiesSummary -> ArrayPropertiesSummary -> Bool
$c/= :: ArrayPropertiesSummary -> ArrayPropertiesSummary -> Bool
== :: ArrayPropertiesSummary -> ArrayPropertiesSummary -> Bool
$c== :: ArrayPropertiesSummary -> ArrayPropertiesSummary -> Bool
Prelude.Eq, ReadPrec [ArrayPropertiesSummary]
ReadPrec ArrayPropertiesSummary
Int -> ReadS ArrayPropertiesSummary
ReadS [ArrayPropertiesSummary]
(Int -> ReadS ArrayPropertiesSummary)
-> ReadS [ArrayPropertiesSummary]
-> ReadPrec ArrayPropertiesSummary
-> ReadPrec [ArrayPropertiesSummary]
-> Read ArrayPropertiesSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ArrayPropertiesSummary]
$creadListPrec :: ReadPrec [ArrayPropertiesSummary]
readPrec :: ReadPrec ArrayPropertiesSummary
$creadPrec :: ReadPrec ArrayPropertiesSummary
readList :: ReadS [ArrayPropertiesSummary]
$creadList :: ReadS [ArrayPropertiesSummary]
readsPrec :: Int -> ReadS ArrayPropertiesSummary
$creadsPrec :: Int -> ReadS ArrayPropertiesSummary
Prelude.Read, Int -> ArrayPropertiesSummary -> ShowS
[ArrayPropertiesSummary] -> ShowS
ArrayPropertiesSummary -> String
(Int -> ArrayPropertiesSummary -> ShowS)
-> (ArrayPropertiesSummary -> String)
-> ([ArrayPropertiesSummary] -> ShowS)
-> Show ArrayPropertiesSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArrayPropertiesSummary] -> ShowS
$cshowList :: [ArrayPropertiesSummary] -> ShowS
show :: ArrayPropertiesSummary -> String
$cshow :: ArrayPropertiesSummary -> String
showsPrec :: Int -> ArrayPropertiesSummary -> ShowS
$cshowsPrec :: Int -> ArrayPropertiesSummary -> ShowS
Prelude.Show, (forall x. ArrayPropertiesSummary -> Rep ArrayPropertiesSummary x)
-> (forall x.
Rep ArrayPropertiesSummary x -> ArrayPropertiesSummary)
-> Generic ArrayPropertiesSummary
forall x. Rep ArrayPropertiesSummary x -> ArrayPropertiesSummary
forall x. ArrayPropertiesSummary -> Rep ArrayPropertiesSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ArrayPropertiesSummary x -> ArrayPropertiesSummary
$cfrom :: forall x. ArrayPropertiesSummary -> Rep ArrayPropertiesSummary x
Prelude.Generic)
newArrayPropertiesSummary ::
ArrayPropertiesSummary
newArrayPropertiesSummary :: ArrayPropertiesSummary
newArrayPropertiesSummary =
ArrayPropertiesSummary' :: Maybe Int -> Maybe Int -> ArrayPropertiesSummary
ArrayPropertiesSummary'
{ $sel:size:ArrayPropertiesSummary' :: Maybe Int
size = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:index:ArrayPropertiesSummary' :: Maybe Int
index = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
arrayPropertiesSummary_size :: Lens.Lens' ArrayPropertiesSummary (Prelude.Maybe Prelude.Int)
arrayPropertiesSummary_size :: (Maybe Int -> f (Maybe Int))
-> ArrayPropertiesSummary -> f ArrayPropertiesSummary
arrayPropertiesSummary_size = (ArrayPropertiesSummary -> Maybe Int)
-> (ArrayPropertiesSummary -> Maybe Int -> ArrayPropertiesSummary)
-> Lens
ArrayPropertiesSummary
ArrayPropertiesSummary
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArrayPropertiesSummary' {Maybe Int
size :: Maybe Int
$sel:size:ArrayPropertiesSummary' :: ArrayPropertiesSummary -> Maybe Int
size} -> Maybe Int
size) (\s :: ArrayPropertiesSummary
s@ArrayPropertiesSummary' {} Maybe Int
a -> ArrayPropertiesSummary
s {$sel:size:ArrayPropertiesSummary' :: Maybe Int
size = Maybe Int
a} :: ArrayPropertiesSummary)
arrayPropertiesSummary_index :: Lens.Lens' ArrayPropertiesSummary (Prelude.Maybe Prelude.Int)
arrayPropertiesSummary_index :: (Maybe Int -> f (Maybe Int))
-> ArrayPropertiesSummary -> f ArrayPropertiesSummary
arrayPropertiesSummary_index = (ArrayPropertiesSummary -> Maybe Int)
-> (ArrayPropertiesSummary -> Maybe Int -> ArrayPropertiesSummary)
-> Lens
ArrayPropertiesSummary
ArrayPropertiesSummary
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArrayPropertiesSummary' {Maybe Int
index :: Maybe Int
$sel:index:ArrayPropertiesSummary' :: ArrayPropertiesSummary -> Maybe Int
index} -> Maybe Int
index) (\s :: ArrayPropertiesSummary
s@ArrayPropertiesSummary' {} Maybe Int
a -> ArrayPropertiesSummary
s {$sel:index:ArrayPropertiesSummary' :: Maybe Int
index = Maybe Int
a} :: ArrayPropertiesSummary)
instance Core.FromJSON ArrayPropertiesSummary where
parseJSON :: Value -> Parser ArrayPropertiesSummary
parseJSON =
String
-> (Object -> Parser ArrayPropertiesSummary)
-> Value
-> Parser ArrayPropertiesSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ArrayPropertiesSummary"
( \Object
x ->
Maybe Int -> Maybe Int -> ArrayPropertiesSummary
ArrayPropertiesSummary'
(Maybe Int -> Maybe Int -> ArrayPropertiesSummary)
-> Parser (Maybe Int)
-> Parser (Maybe Int -> ArrayPropertiesSummary)
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 Int -> ArrayPropertiesSummary)
-> Parser (Maybe Int) -> Parser ArrayPropertiesSummary
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 ArrayPropertiesSummary
instance Prelude.NFData ArrayPropertiesSummary