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