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