module Stratosphere.ACMPCA.CertificateAuthority.CsrExtensionsProperty (
module Exports, CsrExtensionsProperty(..), mkCsrExtensionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ACMPCA.CertificateAuthority.AccessDescriptionProperty as Exports
import {-# SOURCE #-} Stratosphere.ACMPCA.CertificateAuthority.KeyUsageProperty as Exports
import Stratosphere.ResourceProperties
data CsrExtensionsProperty
=
CsrExtensionsProperty {CsrExtensionsProperty -> ()
haddock_workaround_ :: (),
CsrExtensionsProperty -> Maybe KeyUsageProperty
keyUsage :: (Prelude.Maybe KeyUsageProperty),
CsrExtensionsProperty -> Maybe [AccessDescriptionProperty]
subjectInformationAccess :: (Prelude.Maybe [AccessDescriptionProperty])}
deriving stock (CsrExtensionsProperty -> CsrExtensionsProperty -> Bool
(CsrExtensionsProperty -> CsrExtensionsProperty -> Bool)
-> (CsrExtensionsProperty -> CsrExtensionsProperty -> Bool)
-> Eq CsrExtensionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CsrExtensionsProperty -> CsrExtensionsProperty -> Bool
== :: CsrExtensionsProperty -> CsrExtensionsProperty -> Bool
$c/= :: CsrExtensionsProperty -> CsrExtensionsProperty -> Bool
/= :: CsrExtensionsProperty -> CsrExtensionsProperty -> Bool
Prelude.Eq, Int -> CsrExtensionsProperty -> ShowS
[CsrExtensionsProperty] -> ShowS
CsrExtensionsProperty -> String
(Int -> CsrExtensionsProperty -> ShowS)
-> (CsrExtensionsProperty -> String)
-> ([CsrExtensionsProperty] -> ShowS)
-> Show CsrExtensionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CsrExtensionsProperty -> ShowS
showsPrec :: Int -> CsrExtensionsProperty -> ShowS
$cshow :: CsrExtensionsProperty -> String
show :: CsrExtensionsProperty -> String
$cshowList :: [CsrExtensionsProperty] -> ShowS
showList :: [CsrExtensionsProperty] -> ShowS
Prelude.Show)
mkCsrExtensionsProperty :: CsrExtensionsProperty
mkCsrExtensionsProperty :: CsrExtensionsProperty
mkCsrExtensionsProperty
= CsrExtensionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), keyUsage :: Maybe KeyUsageProperty
keyUsage = Maybe KeyUsageProperty
forall a. Maybe a
Prelude.Nothing,
subjectInformationAccess :: Maybe [AccessDescriptionProperty]
subjectInformationAccess = Maybe [AccessDescriptionProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CsrExtensionsProperty where
toResourceProperties :: CsrExtensionsProperty -> ResourceProperties
toResourceProperties CsrExtensionsProperty {Maybe [AccessDescriptionProperty]
Maybe KeyUsageProperty
()
haddock_workaround_ :: CsrExtensionsProperty -> ()
keyUsage :: CsrExtensionsProperty -> Maybe KeyUsageProperty
subjectInformationAccess :: CsrExtensionsProperty -> Maybe [AccessDescriptionProperty]
haddock_workaround_ :: ()
keyUsage :: Maybe KeyUsageProperty
subjectInformationAccess :: Maybe [AccessDescriptionProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ACMPCA::CertificateAuthority.CsrExtensions",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> KeyUsageProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KeyUsage" (KeyUsageProperty -> (Key, Value))
-> Maybe KeyUsageProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KeyUsageProperty
keyUsage,
Key -> [AccessDescriptionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SubjectInformationAccess"
([AccessDescriptionProperty] -> (Key, Value))
-> Maybe [AccessDescriptionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AccessDescriptionProperty]
subjectInformationAccess])}
instance JSON.ToJSON CsrExtensionsProperty where
toJSON :: CsrExtensionsProperty -> Value
toJSON CsrExtensionsProperty {Maybe [AccessDescriptionProperty]
Maybe KeyUsageProperty
()
haddock_workaround_ :: CsrExtensionsProperty -> ()
keyUsage :: CsrExtensionsProperty -> Maybe KeyUsageProperty
subjectInformationAccess :: CsrExtensionsProperty -> Maybe [AccessDescriptionProperty]
haddock_workaround_ :: ()
keyUsage :: Maybe KeyUsageProperty
subjectInformationAccess :: Maybe [AccessDescriptionProperty]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> KeyUsageProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KeyUsage" (KeyUsageProperty -> (Key, Value))
-> Maybe KeyUsageProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KeyUsageProperty
keyUsage,
Key -> [AccessDescriptionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SubjectInformationAccess"
([AccessDescriptionProperty] -> (Key, Value))
-> Maybe [AccessDescriptionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AccessDescriptionProperty]
subjectInformationAccess]))
instance Property "KeyUsage" CsrExtensionsProperty where
type PropertyType "KeyUsage" CsrExtensionsProperty = KeyUsageProperty
set :: PropertyType "KeyUsage" CsrExtensionsProperty
-> CsrExtensionsProperty -> CsrExtensionsProperty
set PropertyType "KeyUsage" CsrExtensionsProperty
newValue CsrExtensionsProperty {Maybe [AccessDescriptionProperty]
Maybe KeyUsageProperty
()
haddock_workaround_ :: CsrExtensionsProperty -> ()
keyUsage :: CsrExtensionsProperty -> Maybe KeyUsageProperty
subjectInformationAccess :: CsrExtensionsProperty -> Maybe [AccessDescriptionProperty]
haddock_workaround_ :: ()
keyUsage :: Maybe KeyUsageProperty
subjectInformationAccess :: Maybe [AccessDescriptionProperty]
..}
= CsrExtensionsProperty {keyUsage :: Maybe KeyUsageProperty
keyUsage = KeyUsageProperty -> Maybe KeyUsageProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KeyUsage" CsrExtensionsProperty
KeyUsageProperty
newValue, Maybe [AccessDescriptionProperty]
()
haddock_workaround_ :: ()
subjectInformationAccess :: Maybe [AccessDescriptionProperty]
haddock_workaround_ :: ()
subjectInformationAccess :: Maybe [AccessDescriptionProperty]
..}
instance Property "SubjectInformationAccess" CsrExtensionsProperty where
type PropertyType "SubjectInformationAccess" CsrExtensionsProperty = [AccessDescriptionProperty]
set :: PropertyType "SubjectInformationAccess" CsrExtensionsProperty
-> CsrExtensionsProperty -> CsrExtensionsProperty
set PropertyType "SubjectInformationAccess" CsrExtensionsProperty
newValue CsrExtensionsProperty {Maybe [AccessDescriptionProperty]
Maybe KeyUsageProperty
()
haddock_workaround_ :: CsrExtensionsProperty -> ()
keyUsage :: CsrExtensionsProperty -> Maybe KeyUsageProperty
subjectInformationAccess :: CsrExtensionsProperty -> Maybe [AccessDescriptionProperty]
haddock_workaround_ :: ()
keyUsage :: Maybe KeyUsageProperty
subjectInformationAccess :: Maybe [AccessDescriptionProperty]
..}
= CsrExtensionsProperty
{subjectInformationAccess :: Maybe [AccessDescriptionProperty]
subjectInformationAccess = [AccessDescriptionProperty] -> Maybe [AccessDescriptionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [AccessDescriptionProperty]
PropertyType "SubjectInformationAccess" CsrExtensionsProperty
newValue, Maybe KeyUsageProperty
()
haddock_workaround_ :: ()
keyUsage :: Maybe KeyUsageProperty
haddock_workaround_ :: ()
keyUsage :: Maybe KeyUsageProperty
..}