{-# 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.AppMesh.Types.TlsValidationContextAcmTrust where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TlsValidationContextAcmTrust = TlsValidationContextAcmTrust'
{
TlsValidationContextAcmTrust -> NonEmpty Text
certificateAuthorityArns :: Prelude.NonEmpty Prelude.Text
}
deriving (TlsValidationContextAcmTrust
-> TlsValidationContextAcmTrust -> Bool
(TlsValidationContextAcmTrust
-> TlsValidationContextAcmTrust -> Bool)
-> (TlsValidationContextAcmTrust
-> TlsValidationContextAcmTrust -> Bool)
-> Eq TlsValidationContextAcmTrust
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TlsValidationContextAcmTrust
-> TlsValidationContextAcmTrust -> Bool
$c/= :: TlsValidationContextAcmTrust
-> TlsValidationContextAcmTrust -> Bool
== :: TlsValidationContextAcmTrust
-> TlsValidationContextAcmTrust -> Bool
$c== :: TlsValidationContextAcmTrust
-> TlsValidationContextAcmTrust -> Bool
Prelude.Eq, ReadPrec [TlsValidationContextAcmTrust]
ReadPrec TlsValidationContextAcmTrust
Int -> ReadS TlsValidationContextAcmTrust
ReadS [TlsValidationContextAcmTrust]
(Int -> ReadS TlsValidationContextAcmTrust)
-> ReadS [TlsValidationContextAcmTrust]
-> ReadPrec TlsValidationContextAcmTrust
-> ReadPrec [TlsValidationContextAcmTrust]
-> Read TlsValidationContextAcmTrust
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TlsValidationContextAcmTrust]
$creadListPrec :: ReadPrec [TlsValidationContextAcmTrust]
readPrec :: ReadPrec TlsValidationContextAcmTrust
$creadPrec :: ReadPrec TlsValidationContextAcmTrust
readList :: ReadS [TlsValidationContextAcmTrust]
$creadList :: ReadS [TlsValidationContextAcmTrust]
readsPrec :: Int -> ReadS TlsValidationContextAcmTrust
$creadsPrec :: Int -> ReadS TlsValidationContextAcmTrust
Prelude.Read, Int -> TlsValidationContextAcmTrust -> ShowS
[TlsValidationContextAcmTrust] -> ShowS
TlsValidationContextAcmTrust -> String
(Int -> TlsValidationContextAcmTrust -> ShowS)
-> (TlsValidationContextAcmTrust -> String)
-> ([TlsValidationContextAcmTrust] -> ShowS)
-> Show TlsValidationContextAcmTrust
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TlsValidationContextAcmTrust] -> ShowS
$cshowList :: [TlsValidationContextAcmTrust] -> ShowS
show :: TlsValidationContextAcmTrust -> String
$cshow :: TlsValidationContextAcmTrust -> String
showsPrec :: Int -> TlsValidationContextAcmTrust -> ShowS
$cshowsPrec :: Int -> TlsValidationContextAcmTrust -> ShowS
Prelude.Show, (forall x.
TlsValidationContextAcmTrust -> Rep TlsValidationContextAcmTrust x)
-> (forall x.
Rep TlsValidationContextAcmTrust x -> TlsValidationContextAcmTrust)
-> Generic TlsValidationContextAcmTrust
forall x.
Rep TlsValidationContextAcmTrust x -> TlsValidationContextAcmTrust
forall x.
TlsValidationContextAcmTrust -> Rep TlsValidationContextAcmTrust x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TlsValidationContextAcmTrust x -> TlsValidationContextAcmTrust
$cfrom :: forall x.
TlsValidationContextAcmTrust -> Rep TlsValidationContextAcmTrust x
Prelude.Generic)
newTlsValidationContextAcmTrust ::
Prelude.NonEmpty Prelude.Text ->
TlsValidationContextAcmTrust
newTlsValidationContextAcmTrust :: NonEmpty Text -> TlsValidationContextAcmTrust
newTlsValidationContextAcmTrust
NonEmpty Text
pCertificateAuthorityArns_ =
TlsValidationContextAcmTrust' :: NonEmpty Text -> TlsValidationContextAcmTrust
TlsValidationContextAcmTrust'
{ $sel:certificateAuthorityArns:TlsValidationContextAcmTrust' :: NonEmpty Text
certificateAuthorityArns =
Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
(Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pCertificateAuthorityArns_
}
tlsValidationContextAcmTrust_certificateAuthorityArns :: Lens.Lens' TlsValidationContextAcmTrust (Prelude.NonEmpty Prelude.Text)
tlsValidationContextAcmTrust_certificateAuthorityArns :: (NonEmpty Text -> f (NonEmpty Text))
-> TlsValidationContextAcmTrust -> f TlsValidationContextAcmTrust
tlsValidationContextAcmTrust_certificateAuthorityArns = (TlsValidationContextAcmTrust -> NonEmpty Text)
-> (TlsValidationContextAcmTrust
-> NonEmpty Text -> TlsValidationContextAcmTrust)
-> Lens
TlsValidationContextAcmTrust
TlsValidationContextAcmTrust
(NonEmpty Text)
(NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TlsValidationContextAcmTrust' {NonEmpty Text
certificateAuthorityArns :: NonEmpty Text
$sel:certificateAuthorityArns:TlsValidationContextAcmTrust' :: TlsValidationContextAcmTrust -> NonEmpty Text
certificateAuthorityArns} -> NonEmpty Text
certificateAuthorityArns) (\s :: TlsValidationContextAcmTrust
s@TlsValidationContextAcmTrust' {} NonEmpty Text
a -> TlsValidationContextAcmTrust
s {$sel:certificateAuthorityArns:TlsValidationContextAcmTrust' :: NonEmpty Text
certificateAuthorityArns = NonEmpty Text
a} :: TlsValidationContextAcmTrust) ((NonEmpty Text -> f (NonEmpty Text))
-> TlsValidationContextAcmTrust -> f TlsValidationContextAcmTrust)
-> ((NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> TlsValidationContextAcmTrust
-> f TlsValidationContextAcmTrust
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON TlsValidationContextAcmTrust where
parseJSON :: Value -> Parser TlsValidationContextAcmTrust
parseJSON =
String
-> (Object -> Parser TlsValidationContextAcmTrust)
-> Value
-> Parser TlsValidationContextAcmTrust
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TlsValidationContextAcmTrust"
( \Object
x ->
NonEmpty Text -> TlsValidationContextAcmTrust
TlsValidationContextAcmTrust'
(NonEmpty Text -> TlsValidationContextAcmTrust)
-> Parser (NonEmpty Text) -> Parser TlsValidationContextAcmTrust
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (NonEmpty Text)
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"certificateAuthorityArns")
)
instance
Prelude.Hashable
TlsValidationContextAcmTrust
instance Prelude.NFData TlsValidationContextAcmTrust
instance Core.ToJSON TlsValidationContextAcmTrust where
toJSON :: TlsValidationContextAcmTrust -> Value
toJSON TlsValidationContextAcmTrust' {NonEmpty Text
certificateAuthorityArns :: NonEmpty Text
$sel:certificateAuthorityArns:TlsValidationContextAcmTrust' :: TlsValidationContextAcmTrust -> NonEmpty Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"certificateAuthorityArns"
Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
certificateAuthorityArns
)
]
)