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