{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ArrayPropertiesSummary = ArrayPropertiesSummary'
{
ArrayPropertiesSummary -> Maybe Int
index :: Prelude.Maybe Prelude.Int,
ArrayPropertiesSummary -> Maybe Int
size :: Prelude.Maybe Prelude.Int
}
deriving (ArrayPropertiesSummary -> ArrayPropertiesSummary -> Bool
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]
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
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. 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'
{ $sel:index:ArrayPropertiesSummary' :: Maybe Int
index = forall a. Maybe a
Prelude.Nothing,
$sel:size:ArrayPropertiesSummary' :: Maybe Int
size = forall a. Maybe a
Prelude.Nothing
}
arrayPropertiesSummary_index :: Lens.Lens' ArrayPropertiesSummary (Prelude.Maybe Prelude.Int)
arrayPropertiesSummary_index :: Lens' ArrayPropertiesSummary (Maybe Int)
arrayPropertiesSummary_index = 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)
arrayPropertiesSummary_size :: Lens.Lens' ArrayPropertiesSummary (Prelude.Maybe Prelude.Int)
arrayPropertiesSummary_size :: Lens' ArrayPropertiesSummary (Maybe Int)
arrayPropertiesSummary_size = 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)
instance Data.FromJSON ArrayPropertiesSummary where
parseJSON :: Value -> Parser ArrayPropertiesSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ArrayPropertiesSummary"
( \Object
x ->
Maybe Int -> Maybe Int -> ArrayPropertiesSummary
ArrayPropertiesSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"index")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"size")
)
instance Prelude.Hashable ArrayPropertiesSummary where
hashWithSalt :: Int -> ArrayPropertiesSummary -> Int
hashWithSalt Int
_salt ArrayPropertiesSummary' {Maybe Int
size :: Maybe Int
index :: Maybe Int
$sel:size:ArrayPropertiesSummary' :: ArrayPropertiesSummary -> Maybe Int
$sel:index:ArrayPropertiesSummary' :: ArrayPropertiesSummary -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
index
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
size
instance Prelude.NFData ArrayPropertiesSummary where
rnf :: ArrayPropertiesSummary -> ()
rnf ArrayPropertiesSummary' {Maybe Int
size :: Maybe Int
index :: Maybe Int
$sel:size:ArrayPropertiesSummary' :: ArrayPropertiesSummary -> Maybe Int
$sel:index:ArrayPropertiesSummary' :: ArrayPropertiesSummary -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
index seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
size