{-# 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.ApiPassthrough where
import Amazonka.CertificateManagerPCA.Types.ASN1Subject
import Amazonka.CertificateManagerPCA.Types.Extensions
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ApiPassthrough = ApiPassthrough'
{
ApiPassthrough -> Maybe Extensions
extensions :: Prelude.Maybe Extensions,
ApiPassthrough -> Maybe ASN1Subject
subject :: Prelude.Maybe ASN1Subject
}
deriving (ApiPassthrough -> ApiPassthrough -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApiPassthrough -> ApiPassthrough -> Bool
$c/= :: ApiPassthrough -> ApiPassthrough -> Bool
== :: ApiPassthrough -> ApiPassthrough -> Bool
$c== :: ApiPassthrough -> ApiPassthrough -> Bool
Prelude.Eq, ReadPrec [ApiPassthrough]
ReadPrec ApiPassthrough
Int -> ReadS ApiPassthrough
ReadS [ApiPassthrough]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApiPassthrough]
$creadListPrec :: ReadPrec [ApiPassthrough]
readPrec :: ReadPrec ApiPassthrough
$creadPrec :: ReadPrec ApiPassthrough
readList :: ReadS [ApiPassthrough]
$creadList :: ReadS [ApiPassthrough]
readsPrec :: Int -> ReadS ApiPassthrough
$creadsPrec :: Int -> ReadS ApiPassthrough
Prelude.Read, Int -> ApiPassthrough -> ShowS
[ApiPassthrough] -> ShowS
ApiPassthrough -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApiPassthrough] -> ShowS
$cshowList :: [ApiPassthrough] -> ShowS
show :: ApiPassthrough -> String
$cshow :: ApiPassthrough -> String
showsPrec :: Int -> ApiPassthrough -> ShowS
$cshowsPrec :: Int -> ApiPassthrough -> ShowS
Prelude.Show, forall x. Rep ApiPassthrough x -> ApiPassthrough
forall x. ApiPassthrough -> Rep ApiPassthrough x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ApiPassthrough x -> ApiPassthrough
$cfrom :: forall x. ApiPassthrough -> Rep ApiPassthrough x
Prelude.Generic)
newApiPassthrough ::
ApiPassthrough
newApiPassthrough :: ApiPassthrough
newApiPassthrough =
ApiPassthrough'
{ $sel:extensions:ApiPassthrough' :: Maybe Extensions
extensions = forall a. Maybe a
Prelude.Nothing,
$sel:subject:ApiPassthrough' :: Maybe ASN1Subject
subject = forall a. Maybe a
Prelude.Nothing
}
apiPassthrough_extensions :: Lens.Lens' ApiPassthrough (Prelude.Maybe Extensions)
apiPassthrough_extensions :: Lens' ApiPassthrough (Maybe Extensions)
apiPassthrough_extensions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApiPassthrough' {Maybe Extensions
extensions :: Maybe Extensions
$sel:extensions:ApiPassthrough' :: ApiPassthrough -> Maybe Extensions
extensions} -> Maybe Extensions
extensions) (\s :: ApiPassthrough
s@ApiPassthrough' {} Maybe Extensions
a -> ApiPassthrough
s {$sel:extensions:ApiPassthrough' :: Maybe Extensions
extensions = Maybe Extensions
a} :: ApiPassthrough)
apiPassthrough_subject :: Lens.Lens' ApiPassthrough (Prelude.Maybe ASN1Subject)
apiPassthrough_subject :: Lens' ApiPassthrough (Maybe ASN1Subject)
apiPassthrough_subject = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApiPassthrough' {Maybe ASN1Subject
subject :: Maybe ASN1Subject
$sel:subject:ApiPassthrough' :: ApiPassthrough -> Maybe ASN1Subject
subject} -> Maybe ASN1Subject
subject) (\s :: ApiPassthrough
s@ApiPassthrough' {} Maybe ASN1Subject
a -> ApiPassthrough
s {$sel:subject:ApiPassthrough' :: Maybe ASN1Subject
subject = Maybe ASN1Subject
a} :: ApiPassthrough)
instance Prelude.Hashable ApiPassthrough where
hashWithSalt :: Int -> ApiPassthrough -> Int
hashWithSalt Int
_salt ApiPassthrough' {Maybe ASN1Subject
Maybe Extensions
subject :: Maybe ASN1Subject
extensions :: Maybe Extensions
$sel:subject:ApiPassthrough' :: ApiPassthrough -> Maybe ASN1Subject
$sel:extensions:ApiPassthrough' :: ApiPassthrough -> Maybe Extensions
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Extensions
extensions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ASN1Subject
subject
instance Prelude.NFData ApiPassthrough where
rnf :: ApiPassthrough -> ()
rnf ApiPassthrough' {Maybe ASN1Subject
Maybe Extensions
subject :: Maybe ASN1Subject
extensions :: Maybe Extensions
$sel:subject:ApiPassthrough' :: ApiPassthrough -> Maybe ASN1Subject
$sel:extensions:ApiPassthrough' :: ApiPassthrough -> Maybe Extensions
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Extensions
extensions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ASN1Subject
subject
instance Data.ToJSON ApiPassthrough where
toJSON :: ApiPassthrough -> Value
toJSON ApiPassthrough' {Maybe ASN1Subject
Maybe Extensions
subject :: Maybe ASN1Subject
extensions :: Maybe Extensions
$sel:subject:ApiPassthrough' :: ApiPassthrough -> Maybe ASN1Subject
$sel:extensions:ApiPassthrough' :: ApiPassthrough -> Maybe Extensions
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Extensions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Extensions
extensions,
(Key
"Subject" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ASN1Subject
subject
]
)