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