{-# 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.CodePipeline.Types.ActionTypeArtifactDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ActionTypeArtifactDetails = ActionTypeArtifactDetails'
{
ActionTypeArtifactDetails -> Natural
minimumCount :: Prelude.Natural,
ActionTypeArtifactDetails -> Natural
maximumCount :: Prelude.Natural
}
deriving (ActionTypeArtifactDetails -> ActionTypeArtifactDetails -> Bool
(ActionTypeArtifactDetails -> ActionTypeArtifactDetails -> Bool)
-> (ActionTypeArtifactDetails -> ActionTypeArtifactDetails -> Bool)
-> Eq ActionTypeArtifactDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionTypeArtifactDetails -> ActionTypeArtifactDetails -> Bool
$c/= :: ActionTypeArtifactDetails -> ActionTypeArtifactDetails -> Bool
== :: ActionTypeArtifactDetails -> ActionTypeArtifactDetails -> Bool
$c== :: ActionTypeArtifactDetails -> ActionTypeArtifactDetails -> Bool
Prelude.Eq, ReadPrec [ActionTypeArtifactDetails]
ReadPrec ActionTypeArtifactDetails
Int -> ReadS ActionTypeArtifactDetails
ReadS [ActionTypeArtifactDetails]
(Int -> ReadS ActionTypeArtifactDetails)
-> ReadS [ActionTypeArtifactDetails]
-> ReadPrec ActionTypeArtifactDetails
-> ReadPrec [ActionTypeArtifactDetails]
-> Read ActionTypeArtifactDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActionTypeArtifactDetails]
$creadListPrec :: ReadPrec [ActionTypeArtifactDetails]
readPrec :: ReadPrec ActionTypeArtifactDetails
$creadPrec :: ReadPrec ActionTypeArtifactDetails
readList :: ReadS [ActionTypeArtifactDetails]
$creadList :: ReadS [ActionTypeArtifactDetails]
readsPrec :: Int -> ReadS ActionTypeArtifactDetails
$creadsPrec :: Int -> ReadS ActionTypeArtifactDetails
Prelude.Read, Int -> ActionTypeArtifactDetails -> ShowS
[ActionTypeArtifactDetails] -> ShowS
ActionTypeArtifactDetails -> String
(Int -> ActionTypeArtifactDetails -> ShowS)
-> (ActionTypeArtifactDetails -> String)
-> ([ActionTypeArtifactDetails] -> ShowS)
-> Show ActionTypeArtifactDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionTypeArtifactDetails] -> ShowS
$cshowList :: [ActionTypeArtifactDetails] -> ShowS
show :: ActionTypeArtifactDetails -> String
$cshow :: ActionTypeArtifactDetails -> String
showsPrec :: Int -> ActionTypeArtifactDetails -> ShowS
$cshowsPrec :: Int -> ActionTypeArtifactDetails -> ShowS
Prelude.Show, (forall x.
ActionTypeArtifactDetails -> Rep ActionTypeArtifactDetails x)
-> (forall x.
Rep ActionTypeArtifactDetails x -> ActionTypeArtifactDetails)
-> Generic ActionTypeArtifactDetails
forall x.
Rep ActionTypeArtifactDetails x -> ActionTypeArtifactDetails
forall x.
ActionTypeArtifactDetails -> Rep ActionTypeArtifactDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ActionTypeArtifactDetails x -> ActionTypeArtifactDetails
$cfrom :: forall x.
ActionTypeArtifactDetails -> Rep ActionTypeArtifactDetails x
Prelude.Generic)
newActionTypeArtifactDetails ::
Prelude.Natural ->
Prelude.Natural ->
ActionTypeArtifactDetails
newActionTypeArtifactDetails :: Natural -> Natural -> ActionTypeArtifactDetails
newActionTypeArtifactDetails
Natural
pMinimumCount_
Natural
pMaximumCount_ =
ActionTypeArtifactDetails' :: Natural -> Natural -> ActionTypeArtifactDetails
ActionTypeArtifactDetails'
{ $sel:minimumCount:ActionTypeArtifactDetails' :: Natural
minimumCount =
Natural
pMinimumCount_,
$sel:maximumCount:ActionTypeArtifactDetails' :: Natural
maximumCount = Natural
pMaximumCount_
}
actionTypeArtifactDetails_minimumCount :: Lens.Lens' ActionTypeArtifactDetails Prelude.Natural
actionTypeArtifactDetails_minimumCount :: (Natural -> f Natural)
-> ActionTypeArtifactDetails -> f ActionTypeArtifactDetails
actionTypeArtifactDetails_minimumCount = (ActionTypeArtifactDetails -> Natural)
-> (ActionTypeArtifactDetails
-> Natural -> ActionTypeArtifactDetails)
-> Lens
ActionTypeArtifactDetails ActionTypeArtifactDetails Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeArtifactDetails' {Natural
minimumCount :: Natural
$sel:minimumCount:ActionTypeArtifactDetails' :: ActionTypeArtifactDetails -> Natural
minimumCount} -> Natural
minimumCount) (\s :: ActionTypeArtifactDetails
s@ActionTypeArtifactDetails' {} Natural
a -> ActionTypeArtifactDetails
s {$sel:minimumCount:ActionTypeArtifactDetails' :: Natural
minimumCount = Natural
a} :: ActionTypeArtifactDetails)
actionTypeArtifactDetails_maximumCount :: Lens.Lens' ActionTypeArtifactDetails Prelude.Natural
actionTypeArtifactDetails_maximumCount :: (Natural -> f Natural)
-> ActionTypeArtifactDetails -> f ActionTypeArtifactDetails
actionTypeArtifactDetails_maximumCount = (ActionTypeArtifactDetails -> Natural)
-> (ActionTypeArtifactDetails
-> Natural -> ActionTypeArtifactDetails)
-> Lens
ActionTypeArtifactDetails ActionTypeArtifactDetails Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeArtifactDetails' {Natural
maximumCount :: Natural
$sel:maximumCount:ActionTypeArtifactDetails' :: ActionTypeArtifactDetails -> Natural
maximumCount} -> Natural
maximumCount) (\s :: ActionTypeArtifactDetails
s@ActionTypeArtifactDetails' {} Natural
a -> ActionTypeArtifactDetails
s {$sel:maximumCount:ActionTypeArtifactDetails' :: Natural
maximumCount = Natural
a} :: ActionTypeArtifactDetails)
instance Core.FromJSON ActionTypeArtifactDetails where
parseJSON :: Value -> Parser ActionTypeArtifactDetails
parseJSON =
String
-> (Object -> Parser ActionTypeArtifactDetails)
-> Value
-> Parser ActionTypeArtifactDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ActionTypeArtifactDetails"
( \Object
x ->
Natural -> Natural -> ActionTypeArtifactDetails
ActionTypeArtifactDetails'
(Natural -> Natural -> ActionTypeArtifactDetails)
-> Parser Natural -> Parser (Natural -> ActionTypeArtifactDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"minimumCount")
Parser (Natural -> ActionTypeArtifactDetails)
-> Parser Natural -> Parser ActionTypeArtifactDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"maximumCount")
)
instance Prelude.Hashable ActionTypeArtifactDetails
instance Prelude.NFData ActionTypeArtifactDetails
instance Core.ToJSON ActionTypeArtifactDetails where
toJSON :: ActionTypeArtifactDetails -> Value
toJSON ActionTypeArtifactDetails' {Natural
maximumCount :: Natural
minimumCount :: Natural
$sel:maximumCount:ActionTypeArtifactDetails' :: ActionTypeArtifactDetails -> Natural
$sel:minimumCount:ActionTypeArtifactDetails' :: ActionTypeArtifactDetails -> Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"minimumCount" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
minimumCount),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"maximumCount" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
maximumCount)
]
)