{-# 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.Support.Types.TrustedAdvisorCheckDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TrustedAdvisorCheckDescription = TrustedAdvisorCheckDescription'
{
TrustedAdvisorCheckDescription -> Text
id :: Prelude.Text,
TrustedAdvisorCheckDescription -> Text
name :: Prelude.Text,
TrustedAdvisorCheckDescription -> Text
description :: Prelude.Text,
TrustedAdvisorCheckDescription -> Text
category :: Prelude.Text,
TrustedAdvisorCheckDescription -> [Text]
metadata :: [Prelude.Text]
}
deriving (TrustedAdvisorCheckDescription
-> TrustedAdvisorCheckDescription -> Bool
(TrustedAdvisorCheckDescription
-> TrustedAdvisorCheckDescription -> Bool)
-> (TrustedAdvisorCheckDescription
-> TrustedAdvisorCheckDescription -> Bool)
-> Eq TrustedAdvisorCheckDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrustedAdvisorCheckDescription
-> TrustedAdvisorCheckDescription -> Bool
$c/= :: TrustedAdvisorCheckDescription
-> TrustedAdvisorCheckDescription -> Bool
== :: TrustedAdvisorCheckDescription
-> TrustedAdvisorCheckDescription -> Bool
$c== :: TrustedAdvisorCheckDescription
-> TrustedAdvisorCheckDescription -> Bool
Prelude.Eq, ReadPrec [TrustedAdvisorCheckDescription]
ReadPrec TrustedAdvisorCheckDescription
Int -> ReadS TrustedAdvisorCheckDescription
ReadS [TrustedAdvisorCheckDescription]
(Int -> ReadS TrustedAdvisorCheckDescription)
-> ReadS [TrustedAdvisorCheckDescription]
-> ReadPrec TrustedAdvisorCheckDescription
-> ReadPrec [TrustedAdvisorCheckDescription]
-> Read TrustedAdvisorCheckDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrustedAdvisorCheckDescription]
$creadListPrec :: ReadPrec [TrustedAdvisorCheckDescription]
readPrec :: ReadPrec TrustedAdvisorCheckDescription
$creadPrec :: ReadPrec TrustedAdvisorCheckDescription
readList :: ReadS [TrustedAdvisorCheckDescription]
$creadList :: ReadS [TrustedAdvisorCheckDescription]
readsPrec :: Int -> ReadS TrustedAdvisorCheckDescription
$creadsPrec :: Int -> ReadS TrustedAdvisorCheckDescription
Prelude.Read, Int -> TrustedAdvisorCheckDescription -> ShowS
[TrustedAdvisorCheckDescription] -> ShowS
TrustedAdvisorCheckDescription -> String
(Int -> TrustedAdvisorCheckDescription -> ShowS)
-> (TrustedAdvisorCheckDescription -> String)
-> ([TrustedAdvisorCheckDescription] -> ShowS)
-> Show TrustedAdvisorCheckDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrustedAdvisorCheckDescription] -> ShowS
$cshowList :: [TrustedAdvisorCheckDescription] -> ShowS
show :: TrustedAdvisorCheckDescription -> String
$cshow :: TrustedAdvisorCheckDescription -> String
showsPrec :: Int -> TrustedAdvisorCheckDescription -> ShowS
$cshowsPrec :: Int -> TrustedAdvisorCheckDescription -> ShowS
Prelude.Show, (forall x.
TrustedAdvisorCheckDescription
-> Rep TrustedAdvisorCheckDescription x)
-> (forall x.
Rep TrustedAdvisorCheckDescription x
-> TrustedAdvisorCheckDescription)
-> Generic TrustedAdvisorCheckDescription
forall x.
Rep TrustedAdvisorCheckDescription x
-> TrustedAdvisorCheckDescription
forall x.
TrustedAdvisorCheckDescription
-> Rep TrustedAdvisorCheckDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrustedAdvisorCheckDescription x
-> TrustedAdvisorCheckDescription
$cfrom :: forall x.
TrustedAdvisorCheckDescription
-> Rep TrustedAdvisorCheckDescription x
Prelude.Generic)
newTrustedAdvisorCheckDescription ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
TrustedAdvisorCheckDescription
newTrustedAdvisorCheckDescription :: Text -> Text -> Text -> Text -> TrustedAdvisorCheckDescription
newTrustedAdvisorCheckDescription
Text
pId_
Text
pName_
Text
pDescription_
Text
pCategory_ =
TrustedAdvisorCheckDescription' :: Text
-> Text -> Text -> Text -> [Text] -> TrustedAdvisorCheckDescription
TrustedAdvisorCheckDescription'
{ $sel:id:TrustedAdvisorCheckDescription' :: Text
id = Text
pId_,
$sel:name:TrustedAdvisorCheckDescription' :: Text
name = Text
pName_,
$sel:description:TrustedAdvisorCheckDescription' :: Text
description = Text
pDescription_,
$sel:category:TrustedAdvisorCheckDescription' :: Text
category = Text
pCategory_,
$sel:metadata:TrustedAdvisorCheckDescription' :: [Text]
metadata = [Text]
forall a. Monoid a => a
Prelude.mempty
}
trustedAdvisorCheckDescription_id :: Lens.Lens' TrustedAdvisorCheckDescription Prelude.Text
trustedAdvisorCheckDescription_id :: (Text -> f Text)
-> TrustedAdvisorCheckDescription
-> f TrustedAdvisorCheckDescription
trustedAdvisorCheckDescription_id = (TrustedAdvisorCheckDescription -> Text)
-> (TrustedAdvisorCheckDescription
-> Text -> TrustedAdvisorCheckDescription)
-> Lens
TrustedAdvisorCheckDescription
TrustedAdvisorCheckDescription
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckDescription' {Text
id :: Text
$sel:id:TrustedAdvisorCheckDescription' :: TrustedAdvisorCheckDescription -> Text
id} -> Text
id) (\s :: TrustedAdvisorCheckDescription
s@TrustedAdvisorCheckDescription' {} Text
a -> TrustedAdvisorCheckDescription
s {$sel:id:TrustedAdvisorCheckDescription' :: Text
id = Text
a} :: TrustedAdvisorCheckDescription)
trustedAdvisorCheckDescription_name :: Lens.Lens' TrustedAdvisorCheckDescription Prelude.Text
trustedAdvisorCheckDescription_name :: (Text -> f Text)
-> TrustedAdvisorCheckDescription
-> f TrustedAdvisorCheckDescription
trustedAdvisorCheckDescription_name = (TrustedAdvisorCheckDescription -> Text)
-> (TrustedAdvisorCheckDescription
-> Text -> TrustedAdvisorCheckDescription)
-> Lens
TrustedAdvisorCheckDescription
TrustedAdvisorCheckDescription
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckDescription' {Text
name :: Text
$sel:name:TrustedAdvisorCheckDescription' :: TrustedAdvisorCheckDescription -> Text
name} -> Text
name) (\s :: TrustedAdvisorCheckDescription
s@TrustedAdvisorCheckDescription' {} Text
a -> TrustedAdvisorCheckDescription
s {$sel:name:TrustedAdvisorCheckDescription' :: Text
name = Text
a} :: TrustedAdvisorCheckDescription)
trustedAdvisorCheckDescription_description :: Lens.Lens' TrustedAdvisorCheckDescription Prelude.Text
trustedAdvisorCheckDescription_description :: (Text -> f Text)
-> TrustedAdvisorCheckDescription
-> f TrustedAdvisorCheckDescription
trustedAdvisorCheckDescription_description = (TrustedAdvisorCheckDescription -> Text)
-> (TrustedAdvisorCheckDescription
-> Text -> TrustedAdvisorCheckDescription)
-> Lens
TrustedAdvisorCheckDescription
TrustedAdvisorCheckDescription
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckDescription' {Text
description :: Text
$sel:description:TrustedAdvisorCheckDescription' :: TrustedAdvisorCheckDescription -> Text
description} -> Text
description) (\s :: TrustedAdvisorCheckDescription
s@TrustedAdvisorCheckDescription' {} Text
a -> TrustedAdvisorCheckDescription
s {$sel:description:TrustedAdvisorCheckDescription' :: Text
description = Text
a} :: TrustedAdvisorCheckDescription)
trustedAdvisorCheckDescription_category :: Lens.Lens' TrustedAdvisorCheckDescription Prelude.Text
trustedAdvisorCheckDescription_category :: (Text -> f Text)
-> TrustedAdvisorCheckDescription
-> f TrustedAdvisorCheckDescription
trustedAdvisorCheckDescription_category = (TrustedAdvisorCheckDescription -> Text)
-> (TrustedAdvisorCheckDescription
-> Text -> TrustedAdvisorCheckDescription)
-> Lens
TrustedAdvisorCheckDescription
TrustedAdvisorCheckDescription
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckDescription' {Text
category :: Text
$sel:category:TrustedAdvisorCheckDescription' :: TrustedAdvisorCheckDescription -> Text
category} -> Text
category) (\s :: TrustedAdvisorCheckDescription
s@TrustedAdvisorCheckDescription' {} Text
a -> TrustedAdvisorCheckDescription
s {$sel:category:TrustedAdvisorCheckDescription' :: Text
category = Text
a} :: TrustedAdvisorCheckDescription)
trustedAdvisorCheckDescription_metadata :: Lens.Lens' TrustedAdvisorCheckDescription [Prelude.Text]
trustedAdvisorCheckDescription_metadata :: ([Text] -> f [Text])
-> TrustedAdvisorCheckDescription
-> f TrustedAdvisorCheckDescription
trustedAdvisorCheckDescription_metadata = (TrustedAdvisorCheckDescription -> [Text])
-> (TrustedAdvisorCheckDescription
-> [Text] -> TrustedAdvisorCheckDescription)
-> Lens
TrustedAdvisorCheckDescription
TrustedAdvisorCheckDescription
[Text]
[Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorCheckDescription' {[Text]
metadata :: [Text]
$sel:metadata:TrustedAdvisorCheckDescription' :: TrustedAdvisorCheckDescription -> [Text]
metadata} -> [Text]
metadata) (\s :: TrustedAdvisorCheckDescription
s@TrustedAdvisorCheckDescription' {} [Text]
a -> TrustedAdvisorCheckDescription
s {$sel:metadata:TrustedAdvisorCheckDescription' :: [Text]
metadata = [Text]
a} :: TrustedAdvisorCheckDescription) (([Text] -> f [Text])
-> TrustedAdvisorCheckDescription
-> f TrustedAdvisorCheckDescription)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> TrustedAdvisorCheckDescription
-> f TrustedAdvisorCheckDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON TrustedAdvisorCheckDescription where
parseJSON :: Value -> Parser TrustedAdvisorCheckDescription
parseJSON =
String
-> (Object -> Parser TrustedAdvisorCheckDescription)
-> Value
-> Parser TrustedAdvisorCheckDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TrustedAdvisorCheckDescription"
( \Object
x ->
Text
-> Text -> Text -> Text -> [Text] -> TrustedAdvisorCheckDescription
TrustedAdvisorCheckDescription'
(Text
-> Text
-> Text
-> Text
-> [Text]
-> TrustedAdvisorCheckDescription)
-> Parser Text
-> Parser
(Text -> Text -> Text -> [Text] -> TrustedAdvisorCheckDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"id")
Parser
(Text -> Text -> Text -> [Text] -> TrustedAdvisorCheckDescription)
-> Parser Text
-> Parser
(Text -> Text -> [Text] -> TrustedAdvisorCheckDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
Parser (Text -> Text -> [Text] -> TrustedAdvisorCheckDescription)
-> Parser Text
-> Parser (Text -> [Text] -> TrustedAdvisorCheckDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"description")
Parser (Text -> [Text] -> TrustedAdvisorCheckDescription)
-> Parser Text -> Parser ([Text] -> TrustedAdvisorCheckDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"category")
Parser ([Text] -> TrustedAdvisorCheckDescription)
-> Parser [Text] -> Parser TrustedAdvisorCheckDescription
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
"metadata" Parser (Maybe [Text]) -> [Text] -> Parser [Text]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [Text]
forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
TrustedAdvisorCheckDescription
instance
Prelude.NFData
TrustedAdvisorCheckDescription