{-# 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.ArrayProperties 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 ArrayProperties = ArrayProperties'
{
ArrayProperties -> Maybe Int
size :: Prelude.Maybe Prelude.Int
}
deriving (ArrayProperties -> ArrayProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArrayProperties -> ArrayProperties -> Bool
$c/= :: ArrayProperties -> ArrayProperties -> Bool
== :: ArrayProperties -> ArrayProperties -> Bool
$c== :: ArrayProperties -> ArrayProperties -> Bool
Prelude.Eq, ReadPrec [ArrayProperties]
ReadPrec ArrayProperties
Int -> ReadS ArrayProperties
ReadS [ArrayProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ArrayProperties]
$creadListPrec :: ReadPrec [ArrayProperties]
readPrec :: ReadPrec ArrayProperties
$creadPrec :: ReadPrec ArrayProperties
readList :: ReadS [ArrayProperties]
$creadList :: ReadS [ArrayProperties]
readsPrec :: Int -> ReadS ArrayProperties
$creadsPrec :: Int -> ReadS ArrayProperties
Prelude.Read, Int -> ArrayProperties -> ShowS
[ArrayProperties] -> ShowS
ArrayProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArrayProperties] -> ShowS
$cshowList :: [ArrayProperties] -> ShowS
show :: ArrayProperties -> String
$cshow :: ArrayProperties -> String
showsPrec :: Int -> ArrayProperties -> ShowS
$cshowsPrec :: Int -> ArrayProperties -> ShowS
Prelude.Show, forall x. Rep ArrayProperties x -> ArrayProperties
forall x. ArrayProperties -> Rep ArrayProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ArrayProperties x -> ArrayProperties
$cfrom :: forall x. ArrayProperties -> Rep ArrayProperties x
Prelude.Generic)
newArrayProperties ::
ArrayProperties
newArrayProperties :: ArrayProperties
newArrayProperties =
ArrayProperties' {$sel:size:ArrayProperties' :: Maybe Int
size = forall a. Maybe a
Prelude.Nothing}
arrayProperties_size :: Lens.Lens' ArrayProperties (Prelude.Maybe Prelude.Int)
arrayProperties_size :: Lens' ArrayProperties (Maybe Int)
arrayProperties_size = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArrayProperties' {Maybe Int
size :: Maybe Int
$sel:size:ArrayProperties' :: ArrayProperties -> Maybe Int
size} -> Maybe Int
size) (\s :: ArrayProperties
s@ArrayProperties' {} Maybe Int
a -> ArrayProperties
s {$sel:size:ArrayProperties' :: Maybe Int
size = Maybe Int
a} :: ArrayProperties)
instance Prelude.Hashable ArrayProperties where
hashWithSalt :: Int -> ArrayProperties -> Int
hashWithSalt Int
_salt ArrayProperties' {Maybe Int
size :: Maybe Int
$sel:size:ArrayProperties' :: ArrayProperties -> Maybe Int
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
size
instance Prelude.NFData ArrayProperties where
rnf :: ArrayProperties -> ()
rnf ArrayProperties' {Maybe Int
size :: Maybe Int
$sel:size:ArrayProperties' :: ArrayProperties -> Maybe Int
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
size
instance Data.ToJSON ArrayProperties where
toJSON :: ArrayProperties -> Value
toJSON ArrayProperties' {Maybe Int
size :: Maybe Int
$sel:size:ArrayProperties' :: ArrayProperties -> Maybe Int
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"size" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
size]
)