{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.WorkSpacesWeb.Types.TrustStoreSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.WorkSpacesWeb.Types.TrustStoreSummary 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

-- | The summary of the trust store.
--
-- /See:/ 'newTrustStoreSummary' smart constructor.
data TrustStoreSummary = TrustStoreSummary'
  { -- | The ARN of the trust store.
    TrustStoreSummary -> Maybe Text
trustStoreArn :: Prelude.Maybe Prelude.Text
  }
  deriving (TrustStoreSummary -> TrustStoreSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrustStoreSummary -> TrustStoreSummary -> Bool
$c/= :: TrustStoreSummary -> TrustStoreSummary -> Bool
== :: TrustStoreSummary -> TrustStoreSummary -> Bool
$c== :: TrustStoreSummary -> TrustStoreSummary -> Bool
Prelude.Eq, ReadPrec [TrustStoreSummary]
ReadPrec TrustStoreSummary
Int -> ReadS TrustStoreSummary
ReadS [TrustStoreSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrustStoreSummary]
$creadListPrec :: ReadPrec [TrustStoreSummary]
readPrec :: ReadPrec TrustStoreSummary
$creadPrec :: ReadPrec TrustStoreSummary
readList :: ReadS [TrustStoreSummary]
$creadList :: ReadS [TrustStoreSummary]
readsPrec :: Int -> ReadS TrustStoreSummary
$creadsPrec :: Int -> ReadS TrustStoreSummary
Prelude.Read, Int -> TrustStoreSummary -> ShowS
[TrustStoreSummary] -> ShowS
TrustStoreSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrustStoreSummary] -> ShowS
$cshowList :: [TrustStoreSummary] -> ShowS
show :: TrustStoreSummary -> String
$cshow :: TrustStoreSummary -> String
showsPrec :: Int -> TrustStoreSummary -> ShowS
$cshowsPrec :: Int -> TrustStoreSummary -> ShowS
Prelude.Show, forall x. Rep TrustStoreSummary x -> TrustStoreSummary
forall x. TrustStoreSummary -> Rep TrustStoreSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TrustStoreSummary x -> TrustStoreSummary
$cfrom :: forall x. TrustStoreSummary -> Rep TrustStoreSummary x
Prelude.Generic)

-- |
-- Create a value of 'TrustStoreSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'trustStoreArn', 'trustStoreSummary_trustStoreArn' - The ARN of the trust store.
newTrustStoreSummary ::
  TrustStoreSummary
newTrustStoreSummary :: TrustStoreSummary
newTrustStoreSummary =
  TrustStoreSummary' {$sel:trustStoreArn:TrustStoreSummary' :: Maybe Text
trustStoreArn = forall a. Maybe a
Prelude.Nothing}

-- | The ARN of the trust store.
trustStoreSummary_trustStoreArn :: Lens.Lens' TrustStoreSummary (Prelude.Maybe Prelude.Text)
trustStoreSummary_trustStoreArn :: Lens' TrustStoreSummary (Maybe Text)
trustStoreSummary_trustStoreArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrustStoreSummary' {Maybe Text
trustStoreArn :: Maybe Text
$sel:trustStoreArn:TrustStoreSummary' :: TrustStoreSummary -> Maybe Text
trustStoreArn} -> Maybe Text
trustStoreArn) (\s :: TrustStoreSummary
s@TrustStoreSummary' {} Maybe Text
a -> TrustStoreSummary
s {$sel:trustStoreArn:TrustStoreSummary' :: Maybe Text
trustStoreArn = Maybe Text
a} :: TrustStoreSummary)

instance Data.FromJSON TrustStoreSummary where
  parseJSON :: Value -> Parser TrustStoreSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"TrustStoreSummary"
      ( \Object
x ->
          Maybe Text -> TrustStoreSummary
TrustStoreSummary'
            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
"trustStoreArn")
      )

instance Prelude.Hashable TrustStoreSummary where
  hashWithSalt :: Int -> TrustStoreSummary -> Int
hashWithSalt Int
_salt TrustStoreSummary' {Maybe Text
trustStoreArn :: Maybe Text
$sel:trustStoreArn:TrustStoreSummary' :: TrustStoreSummary -> Maybe Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
trustStoreArn

instance Prelude.NFData TrustStoreSummary where
  rnf :: TrustStoreSummary -> ()
rnf TrustStoreSummary' {Maybe Text
trustStoreArn :: Maybe Text
$sel:trustStoreArn:TrustStoreSummary' :: TrustStoreSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trustStoreArn