{-# 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.WorkSpacesWeb.Types.TrustStore 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 TrustStore = TrustStore'
{
TrustStore -> Maybe [Text]
associatedPortalArns :: Prelude.Maybe [Prelude.Text],
TrustStore -> Maybe Text
trustStoreArn :: Prelude.Maybe Prelude.Text
}
deriving (TrustStore -> TrustStore -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrustStore -> TrustStore -> Bool
$c/= :: TrustStore -> TrustStore -> Bool
== :: TrustStore -> TrustStore -> Bool
$c== :: TrustStore -> TrustStore -> Bool
Prelude.Eq, ReadPrec [TrustStore]
ReadPrec TrustStore
Int -> ReadS TrustStore
ReadS [TrustStore]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrustStore]
$creadListPrec :: ReadPrec [TrustStore]
readPrec :: ReadPrec TrustStore
$creadPrec :: ReadPrec TrustStore
readList :: ReadS [TrustStore]
$creadList :: ReadS [TrustStore]
readsPrec :: Int -> ReadS TrustStore
$creadsPrec :: Int -> ReadS TrustStore
Prelude.Read, Int -> TrustStore -> ShowS
[TrustStore] -> ShowS
TrustStore -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrustStore] -> ShowS
$cshowList :: [TrustStore] -> ShowS
show :: TrustStore -> String
$cshow :: TrustStore -> String
showsPrec :: Int -> TrustStore -> ShowS
$cshowsPrec :: Int -> TrustStore -> ShowS
Prelude.Show, forall x. Rep TrustStore x -> TrustStore
forall x. TrustStore -> Rep TrustStore x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TrustStore x -> TrustStore
$cfrom :: forall x. TrustStore -> Rep TrustStore x
Prelude.Generic)
newTrustStore ::
TrustStore
newTrustStore :: TrustStore
newTrustStore =
TrustStore'
{ $sel:associatedPortalArns:TrustStore' :: Maybe [Text]
associatedPortalArns = forall a. Maybe a
Prelude.Nothing,
$sel:trustStoreArn:TrustStore' :: Maybe Text
trustStoreArn = forall a. Maybe a
Prelude.Nothing
}
trustStore_associatedPortalArns :: Lens.Lens' TrustStore (Prelude.Maybe [Prelude.Text])
trustStore_associatedPortalArns :: Lens' TrustStore (Maybe [Text])
trustStore_associatedPortalArns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustStore' {Maybe [Text]
associatedPortalArns :: Maybe [Text]
$sel:associatedPortalArns:TrustStore' :: TrustStore -> Maybe [Text]
associatedPortalArns} -> Maybe [Text]
associatedPortalArns) (\s :: TrustStore
s@TrustStore' {} Maybe [Text]
a -> TrustStore
s {$sel:associatedPortalArns:TrustStore' :: Maybe [Text]
associatedPortalArns = Maybe [Text]
a} :: TrustStore) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
trustStore_trustStoreArn :: Lens.Lens' TrustStore (Prelude.Maybe Prelude.Text)
trustStore_trustStoreArn :: Lens' TrustStore (Maybe Text)
trustStore_trustStoreArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustStore' {Maybe Text
trustStoreArn :: Maybe Text
$sel:trustStoreArn:TrustStore' :: TrustStore -> Maybe Text
trustStoreArn} -> Maybe Text
trustStoreArn) (\s :: TrustStore
s@TrustStore' {} Maybe Text
a -> TrustStore
s {$sel:trustStoreArn:TrustStore' :: Maybe Text
trustStoreArn = Maybe Text
a} :: TrustStore)
instance Data.FromJSON TrustStore where
parseJSON :: Value -> Parser TrustStore
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TrustStore"
( \Object
x ->
Maybe [Text] -> Maybe Text -> TrustStore
TrustStore'
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
"associatedPortalArns"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
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
"trustStoreArn")
)
instance Prelude.Hashable TrustStore where
hashWithSalt :: Int -> TrustStore -> Int
hashWithSalt Int
_salt TrustStore' {Maybe [Text]
Maybe Text
trustStoreArn :: Maybe Text
associatedPortalArns :: Maybe [Text]
$sel:trustStoreArn:TrustStore' :: TrustStore -> Maybe Text
$sel:associatedPortalArns:TrustStore' :: TrustStore -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
associatedPortalArns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
trustStoreArn
instance Prelude.NFData TrustStore where
rnf :: TrustStore -> ()
rnf TrustStore' {Maybe [Text]
Maybe Text
trustStoreArn :: Maybe Text
associatedPortalArns :: Maybe [Text]
$sel:trustStoreArn:TrustStore' :: TrustStore -> Maybe Text
$sel:associatedPortalArns:TrustStore' :: TrustStore -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
associatedPortalArns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trustStoreArn