{-# 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.PortfolioDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data PortfolioDetail = PortfolioDetail'
{
PortfolioDetail -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
PortfolioDetail -> Maybe POSIX
createdTime :: Prelude.Maybe Data.POSIX,
PortfolioDetail -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
PortfolioDetail -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
PortfolioDetail -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
PortfolioDetail -> Maybe Text
providerName :: Prelude.Maybe Prelude.Text
}
deriving (PortfolioDetail -> PortfolioDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PortfolioDetail -> PortfolioDetail -> Bool
$c/= :: PortfolioDetail -> PortfolioDetail -> Bool
== :: PortfolioDetail -> PortfolioDetail -> Bool
$c== :: PortfolioDetail -> PortfolioDetail -> Bool
Prelude.Eq, ReadPrec [PortfolioDetail]
ReadPrec PortfolioDetail
Int -> ReadS PortfolioDetail
ReadS [PortfolioDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PortfolioDetail]
$creadListPrec :: ReadPrec [PortfolioDetail]
readPrec :: ReadPrec PortfolioDetail
$creadPrec :: ReadPrec PortfolioDetail
readList :: ReadS [PortfolioDetail]
$creadList :: ReadS [PortfolioDetail]
readsPrec :: Int -> ReadS PortfolioDetail
$creadsPrec :: Int -> ReadS PortfolioDetail
Prelude.Read, Int -> PortfolioDetail -> ShowS
[PortfolioDetail] -> ShowS
PortfolioDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PortfolioDetail] -> ShowS
$cshowList :: [PortfolioDetail] -> ShowS
show :: PortfolioDetail -> String
$cshow :: PortfolioDetail -> String
showsPrec :: Int -> PortfolioDetail -> ShowS
$cshowsPrec :: Int -> PortfolioDetail -> ShowS
Prelude.Show, forall x. Rep PortfolioDetail x -> PortfolioDetail
forall x. PortfolioDetail -> Rep PortfolioDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PortfolioDetail x -> PortfolioDetail
$cfrom :: forall x. PortfolioDetail -> Rep PortfolioDetail x
Prelude.Generic)
newPortfolioDetail ::
PortfolioDetail
newPortfolioDetail :: PortfolioDetail
newPortfolioDetail =
PortfolioDetail'
{ $sel:arn:PortfolioDetail' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:createdTime:PortfolioDetail' :: Maybe POSIX
createdTime = forall a. Maybe a
Prelude.Nothing,
$sel:description:PortfolioDetail' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:displayName:PortfolioDetail' :: Maybe Text
displayName = forall a. Maybe a
Prelude.Nothing,
$sel:id:PortfolioDetail' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:providerName:PortfolioDetail' :: Maybe Text
providerName = forall a. Maybe a
Prelude.Nothing
}
portfolioDetail_arn :: Lens.Lens' PortfolioDetail (Prelude.Maybe Prelude.Text)
portfolioDetail_arn :: Lens' PortfolioDetail (Maybe Text)
portfolioDetail_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioDetail' {Maybe Text
arn :: Maybe Text
$sel:arn:PortfolioDetail' :: PortfolioDetail -> Maybe Text
arn} -> Maybe Text
arn) (\s :: PortfolioDetail
s@PortfolioDetail' {} Maybe Text
a -> PortfolioDetail
s {$sel:arn:PortfolioDetail' :: Maybe Text
arn = Maybe Text
a} :: PortfolioDetail)
portfolioDetail_createdTime :: Lens.Lens' PortfolioDetail (Prelude.Maybe Prelude.UTCTime)
portfolioDetail_createdTime :: Lens' PortfolioDetail (Maybe UTCTime)
portfolioDetail_createdTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioDetail' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:PortfolioDetail' :: PortfolioDetail -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: PortfolioDetail
s@PortfolioDetail' {} Maybe POSIX
a -> PortfolioDetail
s {$sel:createdTime:PortfolioDetail' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: PortfolioDetail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
portfolioDetail_description :: Lens.Lens' PortfolioDetail (Prelude.Maybe Prelude.Text)
portfolioDetail_description :: Lens' PortfolioDetail (Maybe Text)
portfolioDetail_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioDetail' {Maybe Text
description :: Maybe Text
$sel:description:PortfolioDetail' :: PortfolioDetail -> Maybe Text
description} -> Maybe Text
description) (\s :: PortfolioDetail
s@PortfolioDetail' {} Maybe Text
a -> PortfolioDetail
s {$sel:description:PortfolioDetail' :: Maybe Text
description = Maybe Text
a} :: PortfolioDetail)
portfolioDetail_displayName :: Lens.Lens' PortfolioDetail (Prelude.Maybe Prelude.Text)
portfolioDetail_displayName :: Lens' PortfolioDetail (Maybe Text)
portfolioDetail_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioDetail' {Maybe Text
displayName :: Maybe Text
$sel:displayName:PortfolioDetail' :: PortfolioDetail -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: PortfolioDetail
s@PortfolioDetail' {} Maybe Text
a -> PortfolioDetail
s {$sel:displayName:PortfolioDetail' :: Maybe Text
displayName = Maybe Text
a} :: PortfolioDetail)
portfolioDetail_id :: Lens.Lens' PortfolioDetail (Prelude.Maybe Prelude.Text)
portfolioDetail_id :: Lens' PortfolioDetail (Maybe Text)
portfolioDetail_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioDetail' {Maybe Text
id :: Maybe Text
$sel:id:PortfolioDetail' :: PortfolioDetail -> Maybe Text
id} -> Maybe Text
id) (\s :: PortfolioDetail
s@PortfolioDetail' {} Maybe Text
a -> PortfolioDetail
s {$sel:id:PortfolioDetail' :: Maybe Text
id = Maybe Text
a} :: PortfolioDetail)
portfolioDetail_providerName :: Lens.Lens' PortfolioDetail (Prelude.Maybe Prelude.Text)
portfolioDetail_providerName :: Lens' PortfolioDetail (Maybe Text)
portfolioDetail_providerName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioDetail' {Maybe Text
providerName :: Maybe Text
$sel:providerName:PortfolioDetail' :: PortfolioDetail -> Maybe Text
providerName} -> Maybe Text
providerName) (\s :: PortfolioDetail
s@PortfolioDetail' {} Maybe Text
a -> PortfolioDetail
s {$sel:providerName:PortfolioDetail' :: Maybe Text
providerName = Maybe Text
a} :: PortfolioDetail)
instance Data.FromJSON PortfolioDetail where
parseJSON :: Value -> Parser PortfolioDetail
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PortfolioDetail"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PortfolioDetail
PortfolioDetail'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ARN")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreatedTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DisplayName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ProviderName")
)
instance Prelude.Hashable PortfolioDetail where
hashWithSalt :: Int -> PortfolioDetail -> Int
hashWithSalt Int
_salt PortfolioDetail' {Maybe Text
Maybe POSIX
providerName :: Maybe Text
id :: Maybe Text
displayName :: Maybe Text
description :: Maybe Text
createdTime :: Maybe POSIX
arn :: Maybe Text
$sel:providerName:PortfolioDetail' :: PortfolioDetail -> Maybe Text
$sel:id:PortfolioDetail' :: PortfolioDetail -> Maybe Text
$sel:displayName:PortfolioDetail' :: PortfolioDetail -> Maybe Text
$sel:description:PortfolioDetail' :: PortfolioDetail -> Maybe Text
$sel:createdTime:PortfolioDetail' :: PortfolioDetail -> Maybe POSIX
$sel:arn:PortfolioDetail' :: PortfolioDetail -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
displayName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
providerName
instance Prelude.NFData PortfolioDetail where
rnf :: PortfolioDetail -> ()
rnf PortfolioDetail' {Maybe Text
Maybe POSIX
providerName :: Maybe Text
id :: Maybe Text
displayName :: Maybe Text
description :: Maybe Text
createdTime :: Maybe POSIX
arn :: Maybe Text
$sel:providerName:PortfolioDetail' :: PortfolioDetail -> Maybe Text
$sel:id:PortfolioDetail' :: PortfolioDetail -> Maybe Text
$sel:displayName:PortfolioDetail' :: PortfolioDetail -> Maybe Text
$sel:description:PortfolioDetail' :: PortfolioDetail -> Maybe Text
$sel:createdTime:PortfolioDetail' :: PortfolioDetail -> Maybe POSIX
$sel:arn:PortfolioDetail' :: PortfolioDetail -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
displayName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
providerName