{-# 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.CertificateManagerPCA.Types.ASN1Subject where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ASN1Subject = ASN1Subject'
{
ASN1Subject -> Maybe Text
givenName :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
commonName :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
organizationalUnit :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
country :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
generationQualifier :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
locality :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
pseudonym :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
initials :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
organization :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
serialNumber :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
surname :: Prelude.Maybe Prelude.Text,
ASN1Subject -> Maybe Text
distinguishedNameQualifier :: Prelude.Maybe Prelude.Text
}
deriving (ASN1Subject -> ASN1Subject -> Bool
(ASN1Subject -> ASN1Subject -> Bool)
-> (ASN1Subject -> ASN1Subject -> Bool) -> Eq ASN1Subject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ASN1Subject -> ASN1Subject -> Bool
$c/= :: ASN1Subject -> ASN1Subject -> Bool
== :: ASN1Subject -> ASN1Subject -> Bool
$c== :: ASN1Subject -> ASN1Subject -> Bool
Prelude.Eq, ReadPrec [ASN1Subject]
ReadPrec ASN1Subject
Int -> ReadS ASN1Subject
ReadS [ASN1Subject]
(Int -> ReadS ASN1Subject)
-> ReadS [ASN1Subject]
-> ReadPrec ASN1Subject
-> ReadPrec [ASN1Subject]
-> Read ASN1Subject
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ASN1Subject]
$creadListPrec :: ReadPrec [ASN1Subject]
readPrec :: ReadPrec ASN1Subject
$creadPrec :: ReadPrec ASN1Subject
readList :: ReadS [ASN1Subject]
$creadList :: ReadS [ASN1Subject]
readsPrec :: Int -> ReadS ASN1Subject
$creadsPrec :: Int -> ReadS ASN1Subject
Prelude.Read, Int -> ASN1Subject -> ShowS
[ASN1Subject] -> ShowS
ASN1Subject -> String
(Int -> ASN1Subject -> ShowS)
-> (ASN1Subject -> String)
-> ([ASN1Subject] -> ShowS)
-> Show ASN1Subject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ASN1Subject] -> ShowS
$cshowList :: [ASN1Subject] -> ShowS
show :: ASN1Subject -> String
$cshow :: ASN1Subject -> String
showsPrec :: Int -> ASN1Subject -> ShowS
$cshowsPrec :: Int -> ASN1Subject -> ShowS
Prelude.Show, (forall x. ASN1Subject -> Rep ASN1Subject x)
-> (forall x. Rep ASN1Subject x -> ASN1Subject)
-> Generic ASN1Subject
forall x. Rep ASN1Subject x -> ASN1Subject
forall x. ASN1Subject -> Rep ASN1Subject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ASN1Subject x -> ASN1Subject
$cfrom :: forall x. ASN1Subject -> Rep ASN1Subject x
Prelude.Generic)
newASN1Subject ::
ASN1Subject
newASN1Subject :: ASN1Subject
newASN1Subject =
ASN1Subject' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject
ASN1Subject'
{ $sel:givenName:ASN1Subject' :: Maybe Text
givenName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:state:ASN1Subject' :: Maybe Text
state = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:commonName:ASN1Subject' :: Maybe Text
commonName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:organizationalUnit:ASN1Subject' :: Maybe Text
organizationalUnit = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:country:ASN1Subject' :: Maybe Text
country = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:generationQualifier:ASN1Subject' :: Maybe Text
generationQualifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:locality:ASN1Subject' :: Maybe Text
locality = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pseudonym:ASN1Subject' :: Maybe Text
pseudonym = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:initials:ASN1Subject' :: Maybe Text
initials = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:title:ASN1Subject' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:organization:ASN1Subject' :: Maybe Text
organization = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serialNumber:ASN1Subject' :: Maybe Text
serialNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:surname:ASN1Subject' :: Maybe Text
surname = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:distinguishedNameQualifier:ASN1Subject' :: Maybe Text
distinguishedNameQualifier = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
aSN1Subject_givenName :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_givenName :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_givenName = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
givenName :: Maybe Text
$sel:givenName:ASN1Subject' :: ASN1Subject -> Maybe Text
givenName} -> Maybe Text
givenName) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:givenName:ASN1Subject' :: Maybe Text
givenName = Maybe Text
a} :: ASN1Subject)
aSN1Subject_state :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_state :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_state = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
state :: Maybe Text
$sel:state:ASN1Subject' :: ASN1Subject -> Maybe Text
state} -> Maybe Text
state) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:state:ASN1Subject' :: Maybe Text
state = Maybe Text
a} :: ASN1Subject)
aSN1Subject_commonName :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_commonName :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_commonName = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
commonName :: Maybe Text
$sel:commonName:ASN1Subject' :: ASN1Subject -> Maybe Text
commonName} -> Maybe Text
commonName) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:commonName:ASN1Subject' :: Maybe Text
commonName = Maybe Text
a} :: ASN1Subject)
aSN1Subject_organizationalUnit :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_organizationalUnit :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_organizationalUnit = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
organizationalUnit :: Maybe Text
$sel:organizationalUnit:ASN1Subject' :: ASN1Subject -> Maybe Text
organizationalUnit} -> Maybe Text
organizationalUnit) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:organizationalUnit:ASN1Subject' :: Maybe Text
organizationalUnit = Maybe Text
a} :: ASN1Subject)
aSN1Subject_country :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_country :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_country = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
country :: Maybe Text
$sel:country:ASN1Subject' :: ASN1Subject -> Maybe Text
country} -> Maybe Text
country) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:country:ASN1Subject' :: Maybe Text
country = Maybe Text
a} :: ASN1Subject)
aSN1Subject_generationQualifier :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_generationQualifier :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_generationQualifier = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
generationQualifier :: Maybe Text
$sel:generationQualifier:ASN1Subject' :: ASN1Subject -> Maybe Text
generationQualifier} -> Maybe Text
generationQualifier) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:generationQualifier:ASN1Subject' :: Maybe Text
generationQualifier = Maybe Text
a} :: ASN1Subject)
aSN1Subject_locality :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_locality :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_locality = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
locality :: Maybe Text
$sel:locality:ASN1Subject' :: ASN1Subject -> Maybe Text
locality} -> Maybe Text
locality) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:locality:ASN1Subject' :: Maybe Text
locality = Maybe Text
a} :: ASN1Subject)
aSN1Subject_pseudonym :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_pseudonym :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_pseudonym = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
pseudonym :: Maybe Text
$sel:pseudonym:ASN1Subject' :: ASN1Subject -> Maybe Text
pseudonym} -> Maybe Text
pseudonym) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:pseudonym:ASN1Subject' :: Maybe Text
pseudonym = Maybe Text
a} :: ASN1Subject)
aSN1Subject_initials :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_initials :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_initials = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
initials :: Maybe Text
$sel:initials:ASN1Subject' :: ASN1Subject -> Maybe Text
initials} -> Maybe Text
initials) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:initials:ASN1Subject' :: Maybe Text
initials = Maybe Text
a} :: ASN1Subject)
aSN1Subject_title :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_title :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_title = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
title :: Maybe Text
$sel:title:ASN1Subject' :: ASN1Subject -> Maybe Text
title} -> Maybe Text
title) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:title:ASN1Subject' :: Maybe Text
title = Maybe Text
a} :: ASN1Subject)
aSN1Subject_organization :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_organization :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_organization = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
organization :: Maybe Text
$sel:organization:ASN1Subject' :: ASN1Subject -> Maybe Text
organization} -> Maybe Text
organization) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:organization:ASN1Subject' :: Maybe Text
organization = Maybe Text
a} :: ASN1Subject)
aSN1Subject_serialNumber :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_serialNumber :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_serialNumber = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
serialNumber :: Maybe Text
$sel:serialNumber:ASN1Subject' :: ASN1Subject -> Maybe Text
serialNumber} -> Maybe Text
serialNumber) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:serialNumber:ASN1Subject' :: Maybe Text
serialNumber = Maybe Text
a} :: ASN1Subject)
aSN1Subject_surname :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_surname :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_surname = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
surname :: Maybe Text
$sel:surname:ASN1Subject' :: ASN1Subject -> Maybe Text
surname} -> Maybe Text
surname) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:surname:ASN1Subject' :: Maybe Text
surname = Maybe Text
a} :: ASN1Subject)
aSN1Subject_distinguishedNameQualifier :: Lens.Lens' ASN1Subject (Prelude.Maybe Prelude.Text)
aSN1Subject_distinguishedNameQualifier :: (Maybe Text -> f (Maybe Text)) -> ASN1Subject -> f ASN1Subject
aSN1Subject_distinguishedNameQualifier = (ASN1Subject -> Maybe Text)
-> (ASN1Subject -> Maybe Text -> ASN1Subject)
-> Lens ASN1Subject ASN1Subject (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ASN1Subject' {Maybe Text
distinguishedNameQualifier :: Maybe Text
$sel:distinguishedNameQualifier:ASN1Subject' :: ASN1Subject -> Maybe Text
distinguishedNameQualifier} -> Maybe Text
distinguishedNameQualifier) (\s :: ASN1Subject
s@ASN1Subject' {} Maybe Text
a -> ASN1Subject
s {$sel:distinguishedNameQualifier:ASN1Subject' :: Maybe Text
distinguishedNameQualifier = Maybe Text
a} :: ASN1Subject)
instance Core.FromJSON ASN1Subject where
parseJSON :: Value -> Parser ASN1Subject
parseJSON =
String
-> (Object -> Parser ASN1Subject) -> Value -> Parser ASN1Subject
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ASN1Subject"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject
ASN1Subject'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
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
"GivenName")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"State")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"CommonName")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"OrganizationalUnit")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"Country")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"GenerationQualifier")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"Locality")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"Pseudonym")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"Initials")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ASN1Subject)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"Title")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ASN1Subject)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"Organization")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> ASN1Subject)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"SerialNumber")
Parser (Maybe Text -> Maybe Text -> ASN1Subject)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ASN1Subject)
forall (f :: * -> *) a b. Applicative f => 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
"Surname")
Parser (Maybe Text -> ASN1Subject)
-> Parser (Maybe Text) -> Parser ASN1Subject
forall (f :: * -> *) a b. Applicative f => 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
"DistinguishedNameQualifier")
)
instance Prelude.Hashable ASN1Subject
instance Prelude.NFData ASN1Subject
instance Core.ToJSON ASN1Subject where
toJSON :: ASN1Subject -> Value
toJSON ASN1Subject' {Maybe Text
distinguishedNameQualifier :: Maybe Text
surname :: Maybe Text
serialNumber :: Maybe Text
organization :: Maybe Text
title :: Maybe Text
initials :: Maybe Text
pseudonym :: Maybe Text
locality :: Maybe Text
generationQualifier :: Maybe Text
country :: Maybe Text
organizationalUnit :: Maybe Text
commonName :: Maybe Text
state :: Maybe Text
givenName :: Maybe Text
$sel:distinguishedNameQualifier:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:surname:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:serialNumber:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:organization:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:title:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:initials:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:pseudonym:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:locality:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:generationQualifier:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:country:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:organizationalUnit:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:commonName:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:state:ASN1Subject' :: ASN1Subject -> Maybe Text
$sel:givenName:ASN1Subject' :: ASN1Subject -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"GivenName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
givenName,
(Text
"State" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
state,
(Text
"CommonName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
commonName,
(Text
"OrganizationalUnit" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
organizationalUnit,
(Text
"Country" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
country,
(Text
"GenerationQualifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
generationQualifier,
(Text
"Locality" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
locality,
(Text
"Pseudonym" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pseudonym,
(Text
"Initials" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
initials,
(Text
"Title" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
title,
(Text
"Organization" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
organization,
(Text
"SerialNumber" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serialNumber,
(Text
"Surname" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
surname,
(Text
"DistinguishedNameQualifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
distinguishedNameQualifier
]
)