{-# 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.PortfolioShareDetail 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
import Amazonka.ServiceCatalog.Types.DescribePortfolioShareType
data PortfolioShareDetail = PortfolioShareDetail'
{
PortfolioShareDetail -> Maybe Bool
accepted :: Prelude.Maybe Prelude.Bool,
PortfolioShareDetail -> Maybe Text
principalId :: Prelude.Maybe Prelude.Text,
PortfolioShareDetail -> Maybe Bool
sharePrincipals :: Prelude.Maybe Prelude.Bool,
PortfolioShareDetail -> Maybe Bool
shareTagOptions :: Prelude.Maybe Prelude.Bool,
PortfolioShareDetail -> Maybe DescribePortfolioShareType
type' :: Prelude.Maybe DescribePortfolioShareType
}
deriving (PortfolioShareDetail -> PortfolioShareDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PortfolioShareDetail -> PortfolioShareDetail -> Bool
$c/= :: PortfolioShareDetail -> PortfolioShareDetail -> Bool
== :: PortfolioShareDetail -> PortfolioShareDetail -> Bool
$c== :: PortfolioShareDetail -> PortfolioShareDetail -> Bool
Prelude.Eq, ReadPrec [PortfolioShareDetail]
ReadPrec PortfolioShareDetail
Int -> ReadS PortfolioShareDetail
ReadS [PortfolioShareDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PortfolioShareDetail]
$creadListPrec :: ReadPrec [PortfolioShareDetail]
readPrec :: ReadPrec PortfolioShareDetail
$creadPrec :: ReadPrec PortfolioShareDetail
readList :: ReadS [PortfolioShareDetail]
$creadList :: ReadS [PortfolioShareDetail]
readsPrec :: Int -> ReadS PortfolioShareDetail
$creadsPrec :: Int -> ReadS PortfolioShareDetail
Prelude.Read, Int -> PortfolioShareDetail -> ShowS
[PortfolioShareDetail] -> ShowS
PortfolioShareDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PortfolioShareDetail] -> ShowS
$cshowList :: [PortfolioShareDetail] -> ShowS
show :: PortfolioShareDetail -> String
$cshow :: PortfolioShareDetail -> String
showsPrec :: Int -> PortfolioShareDetail -> ShowS
$cshowsPrec :: Int -> PortfolioShareDetail -> ShowS
Prelude.Show, forall x. Rep PortfolioShareDetail x -> PortfolioShareDetail
forall x. PortfolioShareDetail -> Rep PortfolioShareDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PortfolioShareDetail x -> PortfolioShareDetail
$cfrom :: forall x. PortfolioShareDetail -> Rep PortfolioShareDetail x
Prelude.Generic)
newPortfolioShareDetail ::
PortfolioShareDetail
newPortfolioShareDetail :: PortfolioShareDetail
newPortfolioShareDetail =
PortfolioShareDetail'
{ $sel:accepted:PortfolioShareDetail' :: Maybe Bool
accepted = forall a. Maybe a
Prelude.Nothing,
$sel:principalId:PortfolioShareDetail' :: Maybe Text
principalId = forall a. Maybe a
Prelude.Nothing,
$sel:sharePrincipals:PortfolioShareDetail' :: Maybe Bool
sharePrincipals = forall a. Maybe a
Prelude.Nothing,
$sel:shareTagOptions:PortfolioShareDetail' :: Maybe Bool
shareTagOptions = forall a. Maybe a
Prelude.Nothing,
$sel:type':PortfolioShareDetail' :: Maybe DescribePortfolioShareType
type' = forall a. Maybe a
Prelude.Nothing
}
portfolioShareDetail_accepted :: Lens.Lens' PortfolioShareDetail (Prelude.Maybe Prelude.Bool)
portfolioShareDetail_accepted :: Lens' PortfolioShareDetail (Maybe Bool)
portfolioShareDetail_accepted = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioShareDetail' {Maybe Bool
accepted :: Maybe Bool
$sel:accepted:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Bool
accepted} -> Maybe Bool
accepted) (\s :: PortfolioShareDetail
s@PortfolioShareDetail' {} Maybe Bool
a -> PortfolioShareDetail
s {$sel:accepted:PortfolioShareDetail' :: Maybe Bool
accepted = Maybe Bool
a} :: PortfolioShareDetail)
portfolioShareDetail_principalId :: Lens.Lens' PortfolioShareDetail (Prelude.Maybe Prelude.Text)
portfolioShareDetail_principalId :: Lens' PortfolioShareDetail (Maybe Text)
portfolioShareDetail_principalId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioShareDetail' {Maybe Text
principalId :: Maybe Text
$sel:principalId:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Text
principalId} -> Maybe Text
principalId) (\s :: PortfolioShareDetail
s@PortfolioShareDetail' {} Maybe Text
a -> PortfolioShareDetail
s {$sel:principalId:PortfolioShareDetail' :: Maybe Text
principalId = Maybe Text
a} :: PortfolioShareDetail)
portfolioShareDetail_sharePrincipals :: Lens.Lens' PortfolioShareDetail (Prelude.Maybe Prelude.Bool)
portfolioShareDetail_sharePrincipals :: Lens' PortfolioShareDetail (Maybe Bool)
portfolioShareDetail_sharePrincipals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioShareDetail' {Maybe Bool
sharePrincipals :: Maybe Bool
$sel:sharePrincipals:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Bool
sharePrincipals} -> Maybe Bool
sharePrincipals) (\s :: PortfolioShareDetail
s@PortfolioShareDetail' {} Maybe Bool
a -> PortfolioShareDetail
s {$sel:sharePrincipals:PortfolioShareDetail' :: Maybe Bool
sharePrincipals = Maybe Bool
a} :: PortfolioShareDetail)
portfolioShareDetail_shareTagOptions :: Lens.Lens' PortfolioShareDetail (Prelude.Maybe Prelude.Bool)
portfolioShareDetail_shareTagOptions :: Lens' PortfolioShareDetail (Maybe Bool)
portfolioShareDetail_shareTagOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioShareDetail' {Maybe Bool
shareTagOptions :: Maybe Bool
$sel:shareTagOptions:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Bool
shareTagOptions} -> Maybe Bool
shareTagOptions) (\s :: PortfolioShareDetail
s@PortfolioShareDetail' {} Maybe Bool
a -> PortfolioShareDetail
s {$sel:shareTagOptions:PortfolioShareDetail' :: Maybe Bool
shareTagOptions = Maybe Bool
a} :: PortfolioShareDetail)
portfolioShareDetail_type :: Lens.Lens' PortfolioShareDetail (Prelude.Maybe DescribePortfolioShareType)
portfolioShareDetail_type :: Lens' PortfolioShareDetail (Maybe DescribePortfolioShareType)
portfolioShareDetail_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortfolioShareDetail' {Maybe DescribePortfolioShareType
type' :: Maybe DescribePortfolioShareType
$sel:type':PortfolioShareDetail' :: PortfolioShareDetail -> Maybe DescribePortfolioShareType
type'} -> Maybe DescribePortfolioShareType
type') (\s :: PortfolioShareDetail
s@PortfolioShareDetail' {} Maybe DescribePortfolioShareType
a -> PortfolioShareDetail
s {$sel:type':PortfolioShareDetail' :: Maybe DescribePortfolioShareType
type' = Maybe DescribePortfolioShareType
a} :: PortfolioShareDetail)
instance Data.FromJSON PortfolioShareDetail where
parseJSON :: Value -> Parser PortfolioShareDetail
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PortfolioShareDetail"
( \Object
x ->
Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe DescribePortfolioShareType
-> PortfolioShareDetail
PortfolioShareDetail'
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
"Accepted")
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
"PrincipalId")
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
"SharePrincipals")
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
"ShareTagOptions")
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
"Type")
)
instance Prelude.Hashable PortfolioShareDetail where
hashWithSalt :: Int -> PortfolioShareDetail -> Int
hashWithSalt Int
_salt PortfolioShareDetail' {Maybe Bool
Maybe Text
Maybe DescribePortfolioShareType
type' :: Maybe DescribePortfolioShareType
shareTagOptions :: Maybe Bool
sharePrincipals :: Maybe Bool
principalId :: Maybe Text
accepted :: Maybe Bool
$sel:type':PortfolioShareDetail' :: PortfolioShareDetail -> Maybe DescribePortfolioShareType
$sel:shareTagOptions:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Bool
$sel:sharePrincipals:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Bool
$sel:principalId:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Text
$sel:accepted:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
accepted
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
principalId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
sharePrincipals
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
shareTagOptions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DescribePortfolioShareType
type'
instance Prelude.NFData PortfolioShareDetail where
rnf :: PortfolioShareDetail -> ()
rnf PortfolioShareDetail' {Maybe Bool
Maybe Text
Maybe DescribePortfolioShareType
type' :: Maybe DescribePortfolioShareType
shareTagOptions :: Maybe Bool
sharePrincipals :: Maybe Bool
principalId :: Maybe Text
accepted :: Maybe Bool
$sel:type':PortfolioShareDetail' :: PortfolioShareDetail -> Maybe DescribePortfolioShareType
$sel:shareTagOptions:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Bool
$sel:sharePrincipals:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Bool
$sel:principalId:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Text
$sel:accepted:PortfolioShareDetail' :: PortfolioShareDetail -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
accepted
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
principalId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
sharePrincipals
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
shareTagOptions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DescribePortfolioShareType
type'