{-# 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.PolicyQualifierInfo where
import Amazonka.CertificateManagerPCA.Types.PolicyQualifierId
import Amazonka.CertificateManagerPCA.Types.Qualifier
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PolicyQualifierInfo = PolicyQualifierInfo'
{
PolicyQualifierInfo -> PolicyQualifierId
policyQualifierId :: PolicyQualifierId,
PolicyQualifierInfo -> Qualifier
qualifier :: Qualifier
}
deriving (PolicyQualifierInfo -> PolicyQualifierInfo -> Bool
(PolicyQualifierInfo -> PolicyQualifierInfo -> Bool)
-> (PolicyQualifierInfo -> PolicyQualifierInfo -> Bool)
-> Eq PolicyQualifierInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolicyQualifierInfo -> PolicyQualifierInfo -> Bool
$c/= :: PolicyQualifierInfo -> PolicyQualifierInfo -> Bool
== :: PolicyQualifierInfo -> PolicyQualifierInfo -> Bool
$c== :: PolicyQualifierInfo -> PolicyQualifierInfo -> Bool
Prelude.Eq, ReadPrec [PolicyQualifierInfo]
ReadPrec PolicyQualifierInfo
Int -> ReadS PolicyQualifierInfo
ReadS [PolicyQualifierInfo]
(Int -> ReadS PolicyQualifierInfo)
-> ReadS [PolicyQualifierInfo]
-> ReadPrec PolicyQualifierInfo
-> ReadPrec [PolicyQualifierInfo]
-> Read PolicyQualifierInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PolicyQualifierInfo]
$creadListPrec :: ReadPrec [PolicyQualifierInfo]
readPrec :: ReadPrec PolicyQualifierInfo
$creadPrec :: ReadPrec PolicyQualifierInfo
readList :: ReadS [PolicyQualifierInfo]
$creadList :: ReadS [PolicyQualifierInfo]
readsPrec :: Int -> ReadS PolicyQualifierInfo
$creadsPrec :: Int -> ReadS PolicyQualifierInfo
Prelude.Read, Int -> PolicyQualifierInfo -> ShowS
[PolicyQualifierInfo] -> ShowS
PolicyQualifierInfo -> String
(Int -> PolicyQualifierInfo -> ShowS)
-> (PolicyQualifierInfo -> String)
-> ([PolicyQualifierInfo] -> ShowS)
-> Show PolicyQualifierInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PolicyQualifierInfo] -> ShowS
$cshowList :: [PolicyQualifierInfo] -> ShowS
show :: PolicyQualifierInfo -> String
$cshow :: PolicyQualifierInfo -> String
showsPrec :: Int -> PolicyQualifierInfo -> ShowS
$cshowsPrec :: Int -> PolicyQualifierInfo -> ShowS
Prelude.Show, (forall x. PolicyQualifierInfo -> Rep PolicyQualifierInfo x)
-> (forall x. Rep PolicyQualifierInfo x -> PolicyQualifierInfo)
-> Generic PolicyQualifierInfo
forall x. Rep PolicyQualifierInfo x -> PolicyQualifierInfo
forall x. PolicyQualifierInfo -> Rep PolicyQualifierInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PolicyQualifierInfo x -> PolicyQualifierInfo
$cfrom :: forall x. PolicyQualifierInfo -> Rep PolicyQualifierInfo x
Prelude.Generic)
newPolicyQualifierInfo ::
PolicyQualifierId ->
Qualifier ->
PolicyQualifierInfo
newPolicyQualifierInfo :: PolicyQualifierId -> Qualifier -> PolicyQualifierInfo
newPolicyQualifierInfo
PolicyQualifierId
pPolicyQualifierId_
Qualifier
pQualifier_ =
PolicyQualifierInfo' :: PolicyQualifierId -> Qualifier -> PolicyQualifierInfo
PolicyQualifierInfo'
{ $sel:policyQualifierId:PolicyQualifierInfo' :: PolicyQualifierId
policyQualifierId =
PolicyQualifierId
pPolicyQualifierId_,
$sel:qualifier:PolicyQualifierInfo' :: Qualifier
qualifier = Qualifier
pQualifier_
}
policyQualifierInfo_policyQualifierId :: Lens.Lens' PolicyQualifierInfo PolicyQualifierId
policyQualifierInfo_policyQualifierId :: (PolicyQualifierId -> f PolicyQualifierId)
-> PolicyQualifierInfo -> f PolicyQualifierInfo
policyQualifierInfo_policyQualifierId = (PolicyQualifierInfo -> PolicyQualifierId)
-> (PolicyQualifierInfo
-> PolicyQualifierId -> PolicyQualifierInfo)
-> Lens
PolicyQualifierInfo
PolicyQualifierInfo
PolicyQualifierId
PolicyQualifierId
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyQualifierInfo' {PolicyQualifierId
policyQualifierId :: PolicyQualifierId
$sel:policyQualifierId:PolicyQualifierInfo' :: PolicyQualifierInfo -> PolicyQualifierId
policyQualifierId} -> PolicyQualifierId
policyQualifierId) (\s :: PolicyQualifierInfo
s@PolicyQualifierInfo' {} PolicyQualifierId
a -> PolicyQualifierInfo
s {$sel:policyQualifierId:PolicyQualifierInfo' :: PolicyQualifierId
policyQualifierId = PolicyQualifierId
a} :: PolicyQualifierInfo)
policyQualifierInfo_qualifier :: Lens.Lens' PolicyQualifierInfo Qualifier
policyQualifierInfo_qualifier :: (Qualifier -> f Qualifier)
-> PolicyQualifierInfo -> f PolicyQualifierInfo
policyQualifierInfo_qualifier = (PolicyQualifierInfo -> Qualifier)
-> (PolicyQualifierInfo -> Qualifier -> PolicyQualifierInfo)
-> Lens PolicyQualifierInfo PolicyQualifierInfo Qualifier Qualifier
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyQualifierInfo' {Qualifier
qualifier :: Qualifier
$sel:qualifier:PolicyQualifierInfo' :: PolicyQualifierInfo -> Qualifier
qualifier} -> Qualifier
qualifier) (\s :: PolicyQualifierInfo
s@PolicyQualifierInfo' {} Qualifier
a -> PolicyQualifierInfo
s {$sel:qualifier:PolicyQualifierInfo' :: Qualifier
qualifier = Qualifier
a} :: PolicyQualifierInfo)
instance Prelude.Hashable PolicyQualifierInfo
instance Prelude.NFData PolicyQualifierInfo
instance Core.ToJSON PolicyQualifierInfo where
toJSON :: PolicyQualifierInfo -> Value
toJSON PolicyQualifierInfo' {PolicyQualifierId
Qualifier
qualifier :: Qualifier
policyQualifierId :: PolicyQualifierId
$sel:qualifier:PolicyQualifierInfo' :: PolicyQualifierInfo -> Qualifier
$sel:policyQualifierId:PolicyQualifierInfo' :: PolicyQualifierInfo -> PolicyQualifierId
..} =
[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
"PolicyQualifierId" Text -> PolicyQualifierId -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PolicyQualifierId
policyQualifierId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Qualifier" Text -> Qualifier -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Qualifier
qualifier)
]
)