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