{-# 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.TrustedAdvisorResourceDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TrustedAdvisorResourceDetail = TrustedAdvisorResourceDetail'
{
TrustedAdvisorResourceDetail -> Maybe Bool
isSuppressed :: Prelude.Maybe Prelude.Bool,
TrustedAdvisorResourceDetail -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
TrustedAdvisorResourceDetail -> Text
status :: Prelude.Text,
TrustedAdvisorResourceDetail -> Text
resourceId :: Prelude.Text,
TrustedAdvisorResourceDetail -> [Text]
metadata :: [Prelude.Text]
}
deriving (TrustedAdvisorResourceDetail
-> TrustedAdvisorResourceDetail -> Bool
(TrustedAdvisorResourceDetail
-> TrustedAdvisorResourceDetail -> Bool)
-> (TrustedAdvisorResourceDetail
-> TrustedAdvisorResourceDetail -> Bool)
-> Eq TrustedAdvisorResourceDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrustedAdvisorResourceDetail
-> TrustedAdvisorResourceDetail -> Bool
$c/= :: TrustedAdvisorResourceDetail
-> TrustedAdvisorResourceDetail -> Bool
== :: TrustedAdvisorResourceDetail
-> TrustedAdvisorResourceDetail -> Bool
$c== :: TrustedAdvisorResourceDetail
-> TrustedAdvisorResourceDetail -> Bool
Prelude.Eq, ReadPrec [TrustedAdvisorResourceDetail]
ReadPrec TrustedAdvisorResourceDetail
Int -> ReadS TrustedAdvisorResourceDetail
ReadS [TrustedAdvisorResourceDetail]
(Int -> ReadS TrustedAdvisorResourceDetail)
-> ReadS [TrustedAdvisorResourceDetail]
-> ReadPrec TrustedAdvisorResourceDetail
-> ReadPrec [TrustedAdvisorResourceDetail]
-> Read TrustedAdvisorResourceDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrustedAdvisorResourceDetail]
$creadListPrec :: ReadPrec [TrustedAdvisorResourceDetail]
readPrec :: ReadPrec TrustedAdvisorResourceDetail
$creadPrec :: ReadPrec TrustedAdvisorResourceDetail
readList :: ReadS [TrustedAdvisorResourceDetail]
$creadList :: ReadS [TrustedAdvisorResourceDetail]
readsPrec :: Int -> ReadS TrustedAdvisorResourceDetail
$creadsPrec :: Int -> ReadS TrustedAdvisorResourceDetail
Prelude.Read, Int -> TrustedAdvisorResourceDetail -> ShowS
[TrustedAdvisorResourceDetail] -> ShowS
TrustedAdvisorResourceDetail -> String
(Int -> TrustedAdvisorResourceDetail -> ShowS)
-> (TrustedAdvisorResourceDetail -> String)
-> ([TrustedAdvisorResourceDetail] -> ShowS)
-> Show TrustedAdvisorResourceDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrustedAdvisorResourceDetail] -> ShowS
$cshowList :: [TrustedAdvisorResourceDetail] -> ShowS
show :: TrustedAdvisorResourceDetail -> String
$cshow :: TrustedAdvisorResourceDetail -> String
showsPrec :: Int -> TrustedAdvisorResourceDetail -> ShowS
$cshowsPrec :: Int -> TrustedAdvisorResourceDetail -> ShowS
Prelude.Show, (forall x.
TrustedAdvisorResourceDetail -> Rep TrustedAdvisorResourceDetail x)
-> (forall x.
Rep TrustedAdvisorResourceDetail x -> TrustedAdvisorResourceDetail)
-> Generic TrustedAdvisorResourceDetail
forall x.
Rep TrustedAdvisorResourceDetail x -> TrustedAdvisorResourceDetail
forall x.
TrustedAdvisorResourceDetail -> Rep TrustedAdvisorResourceDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrustedAdvisorResourceDetail x -> TrustedAdvisorResourceDetail
$cfrom :: forall x.
TrustedAdvisorResourceDetail -> Rep TrustedAdvisorResourceDetail x
Prelude.Generic)
newTrustedAdvisorResourceDetail ::
Prelude.Text ->
Prelude.Text ->
TrustedAdvisorResourceDetail
newTrustedAdvisorResourceDetail :: Text -> Text -> TrustedAdvisorResourceDetail
newTrustedAdvisorResourceDetail Text
pStatus_ Text
pResourceId_ =
TrustedAdvisorResourceDetail' :: Maybe Bool
-> Maybe Text
-> Text
-> Text
-> [Text]
-> TrustedAdvisorResourceDetail
TrustedAdvisorResourceDetail'
{ $sel:isSuppressed:TrustedAdvisorResourceDetail' :: Maybe Bool
isSuppressed =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:region:TrustedAdvisorResourceDetail' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:TrustedAdvisorResourceDetail' :: Text
status = Text
pStatus_,
$sel:resourceId:TrustedAdvisorResourceDetail' :: Text
resourceId = Text
pResourceId_,
$sel:metadata:TrustedAdvisorResourceDetail' :: [Text]
metadata = [Text]
forall a. Monoid a => a
Prelude.mempty
}
trustedAdvisorResourceDetail_isSuppressed :: Lens.Lens' TrustedAdvisorResourceDetail (Prelude.Maybe Prelude.Bool)
trustedAdvisorResourceDetail_isSuppressed :: (Maybe Bool -> f (Maybe Bool))
-> TrustedAdvisorResourceDetail -> f TrustedAdvisorResourceDetail
trustedAdvisorResourceDetail_isSuppressed = (TrustedAdvisorResourceDetail -> Maybe Bool)
-> (TrustedAdvisorResourceDetail
-> Maybe Bool -> TrustedAdvisorResourceDetail)
-> Lens
TrustedAdvisorResourceDetail
TrustedAdvisorResourceDetail
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorResourceDetail' {Maybe Bool
isSuppressed :: Maybe Bool
$sel:isSuppressed:TrustedAdvisorResourceDetail' :: TrustedAdvisorResourceDetail -> Maybe Bool
isSuppressed} -> Maybe Bool
isSuppressed) (\s :: TrustedAdvisorResourceDetail
s@TrustedAdvisorResourceDetail' {} Maybe Bool
a -> TrustedAdvisorResourceDetail
s {$sel:isSuppressed:TrustedAdvisorResourceDetail' :: Maybe Bool
isSuppressed = Maybe Bool
a} :: TrustedAdvisorResourceDetail)
trustedAdvisorResourceDetail_region :: Lens.Lens' TrustedAdvisorResourceDetail (Prelude.Maybe Prelude.Text)
trustedAdvisorResourceDetail_region :: (Maybe Text -> f (Maybe Text))
-> TrustedAdvisorResourceDetail -> f TrustedAdvisorResourceDetail
trustedAdvisorResourceDetail_region = (TrustedAdvisorResourceDetail -> Maybe Text)
-> (TrustedAdvisorResourceDetail
-> Maybe Text -> TrustedAdvisorResourceDetail)
-> Lens
TrustedAdvisorResourceDetail
TrustedAdvisorResourceDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorResourceDetail' {Maybe Text
region :: Maybe Text
$sel:region:TrustedAdvisorResourceDetail' :: TrustedAdvisorResourceDetail -> Maybe Text
region} -> Maybe Text
region) (\s :: TrustedAdvisorResourceDetail
s@TrustedAdvisorResourceDetail' {} Maybe Text
a -> TrustedAdvisorResourceDetail
s {$sel:region:TrustedAdvisorResourceDetail' :: Maybe Text
region = Maybe Text
a} :: TrustedAdvisorResourceDetail)
trustedAdvisorResourceDetail_status :: Lens.Lens' TrustedAdvisorResourceDetail Prelude.Text
trustedAdvisorResourceDetail_status :: (Text -> f Text)
-> TrustedAdvisorResourceDetail -> f TrustedAdvisorResourceDetail
trustedAdvisorResourceDetail_status = (TrustedAdvisorResourceDetail -> Text)
-> (TrustedAdvisorResourceDetail
-> Text -> TrustedAdvisorResourceDetail)
-> Lens
TrustedAdvisorResourceDetail TrustedAdvisorResourceDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorResourceDetail' {Text
status :: Text
$sel:status:TrustedAdvisorResourceDetail' :: TrustedAdvisorResourceDetail -> Text
status} -> Text
status) (\s :: TrustedAdvisorResourceDetail
s@TrustedAdvisorResourceDetail' {} Text
a -> TrustedAdvisorResourceDetail
s {$sel:status:TrustedAdvisorResourceDetail' :: Text
status = Text
a} :: TrustedAdvisorResourceDetail)
trustedAdvisorResourceDetail_resourceId :: Lens.Lens' TrustedAdvisorResourceDetail Prelude.Text
trustedAdvisorResourceDetail_resourceId :: (Text -> f Text)
-> TrustedAdvisorResourceDetail -> f TrustedAdvisorResourceDetail
trustedAdvisorResourceDetail_resourceId = (TrustedAdvisorResourceDetail -> Text)
-> (TrustedAdvisorResourceDetail
-> Text -> TrustedAdvisorResourceDetail)
-> Lens
TrustedAdvisorResourceDetail TrustedAdvisorResourceDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorResourceDetail' {Text
resourceId :: Text
$sel:resourceId:TrustedAdvisorResourceDetail' :: TrustedAdvisorResourceDetail -> Text
resourceId} -> Text
resourceId) (\s :: TrustedAdvisorResourceDetail
s@TrustedAdvisorResourceDetail' {} Text
a -> TrustedAdvisorResourceDetail
s {$sel:resourceId:TrustedAdvisorResourceDetail' :: Text
resourceId = Text
a} :: TrustedAdvisorResourceDetail)
trustedAdvisorResourceDetail_metadata :: Lens.Lens' TrustedAdvisorResourceDetail [Prelude.Text]
trustedAdvisorResourceDetail_metadata :: ([Text] -> f [Text])
-> TrustedAdvisorResourceDetail -> f TrustedAdvisorResourceDetail
trustedAdvisorResourceDetail_metadata = (TrustedAdvisorResourceDetail -> [Text])
-> (TrustedAdvisorResourceDetail
-> [Text] -> TrustedAdvisorResourceDetail)
-> Lens
TrustedAdvisorResourceDetail
TrustedAdvisorResourceDetail
[Text]
[Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustedAdvisorResourceDetail' {[Text]
metadata :: [Text]
$sel:metadata:TrustedAdvisorResourceDetail' :: TrustedAdvisorResourceDetail -> [Text]
metadata} -> [Text]
metadata) (\s :: TrustedAdvisorResourceDetail
s@TrustedAdvisorResourceDetail' {} [Text]
a -> TrustedAdvisorResourceDetail
s {$sel:metadata:TrustedAdvisorResourceDetail' :: [Text]
metadata = [Text]
a} :: TrustedAdvisorResourceDetail) (([Text] -> f [Text])
-> TrustedAdvisorResourceDetail -> f TrustedAdvisorResourceDetail)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> TrustedAdvisorResourceDetail
-> f TrustedAdvisorResourceDetail
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 TrustedAdvisorResourceDetail where
parseJSON :: Value -> Parser TrustedAdvisorResourceDetail
parseJSON =
String
-> (Object -> Parser TrustedAdvisorResourceDetail)
-> Value
-> Parser TrustedAdvisorResourceDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TrustedAdvisorResourceDetail"
( \Object
x ->
Maybe Bool
-> Maybe Text
-> Text
-> Text
-> [Text]
-> TrustedAdvisorResourceDetail
TrustedAdvisorResourceDetail'
(Maybe Bool
-> Maybe Text
-> Text
-> Text
-> [Text]
-> TrustedAdvisorResourceDetail)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Text -> Text -> [Text] -> TrustedAdvisorResourceDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"isSuppressed")
Parser
(Maybe Text
-> Text -> Text -> [Text] -> TrustedAdvisorResourceDetail)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> [Text] -> TrustedAdvisorResourceDetail)
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
"region")
Parser (Text -> Text -> [Text] -> TrustedAdvisorResourceDetail)
-> Parser Text
-> Parser (Text -> [Text] -> TrustedAdvisorResourceDetail)
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
"status")
Parser (Text -> [Text] -> TrustedAdvisorResourceDetail)
-> Parser Text -> Parser ([Text] -> TrustedAdvisorResourceDetail)
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
"resourceId")
Parser ([Text] -> TrustedAdvisorResourceDetail)
-> Parser [Text] -> Parser TrustedAdvisorResourceDetail
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
TrustedAdvisorResourceDetail
instance Prelude.NFData TrustedAdvisorResourceDetail