module Stratosphere.RolesAnywhere.TrustAnchor.SourceDataProperty (
SourceDataProperty(..), mkSourceDataProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SourceDataProperty
=
SourceDataProperty {SourceDataProperty -> ()
haddock_workaround_ :: (),
SourceDataProperty -> Maybe (Value Text)
acmPcaArn :: (Prelude.Maybe (Value Prelude.Text)),
SourceDataProperty -> Maybe (Value Text)
x509CertificateData :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (SourceDataProperty -> SourceDataProperty -> Bool
(SourceDataProperty -> SourceDataProperty -> Bool)
-> (SourceDataProperty -> SourceDataProperty -> Bool)
-> Eq SourceDataProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourceDataProperty -> SourceDataProperty -> Bool
== :: SourceDataProperty -> SourceDataProperty -> Bool
$c/= :: SourceDataProperty -> SourceDataProperty -> Bool
/= :: SourceDataProperty -> SourceDataProperty -> Bool
Prelude.Eq, Int -> SourceDataProperty -> ShowS
[SourceDataProperty] -> ShowS
SourceDataProperty -> String
(Int -> SourceDataProperty -> ShowS)
-> (SourceDataProperty -> String)
-> ([SourceDataProperty] -> ShowS)
-> Show SourceDataProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourceDataProperty -> ShowS
showsPrec :: Int -> SourceDataProperty -> ShowS
$cshow :: SourceDataProperty -> String
show :: SourceDataProperty -> String
$cshowList :: [SourceDataProperty] -> ShowS
showList :: [SourceDataProperty] -> ShowS
Prelude.Show)
mkSourceDataProperty :: SourceDataProperty
mkSourceDataProperty :: SourceDataProperty
mkSourceDataProperty
= SourceDataProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), acmPcaArn :: Maybe (Value Text)
acmPcaArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
x509CertificateData :: Maybe (Value Text)
x509CertificateData = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SourceDataProperty where
toResourceProperties :: SourceDataProperty -> ResourceProperties
toResourceProperties SourceDataProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceDataProperty -> ()
acmPcaArn :: SourceDataProperty -> Maybe (Value Text)
x509CertificateData :: SourceDataProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmPcaArn :: Maybe (Value Text)
x509CertificateData :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::RolesAnywhere::TrustAnchor.SourceData",
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 -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AcmPcaArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
acmPcaArn,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"X509CertificateData" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
x509CertificateData])}
instance JSON.ToJSON SourceDataProperty where
toJSON :: SourceDataProperty -> Value
toJSON SourceDataProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceDataProperty -> ()
acmPcaArn :: SourceDataProperty -> Maybe (Value Text)
x509CertificateData :: SourceDataProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmPcaArn :: Maybe (Value Text)
x509CertificateData :: Maybe (Value Text)
..}
= [(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 -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AcmPcaArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
acmPcaArn,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"X509CertificateData" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
x509CertificateData]))
instance Property "AcmPcaArn" SourceDataProperty where
type PropertyType "AcmPcaArn" SourceDataProperty = Value Prelude.Text
set :: PropertyType "AcmPcaArn" SourceDataProperty
-> SourceDataProperty -> SourceDataProperty
set PropertyType "AcmPcaArn" SourceDataProperty
newValue SourceDataProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceDataProperty -> ()
acmPcaArn :: SourceDataProperty -> Maybe (Value Text)
x509CertificateData :: SourceDataProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmPcaArn :: Maybe (Value Text)
x509CertificateData :: Maybe (Value Text)
..}
= SourceDataProperty {acmPcaArn :: Maybe (Value Text)
acmPcaArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AcmPcaArn" SourceDataProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
x509CertificateData :: Maybe (Value Text)
haddock_workaround_ :: ()
x509CertificateData :: Maybe (Value Text)
..}
instance Property "X509CertificateData" SourceDataProperty where
type PropertyType "X509CertificateData" SourceDataProperty = Value Prelude.Text
set :: PropertyType "X509CertificateData" SourceDataProperty
-> SourceDataProperty -> SourceDataProperty
set PropertyType "X509CertificateData" SourceDataProperty
newValue SourceDataProperty {Maybe (Value Text)
()
haddock_workaround_ :: SourceDataProperty -> ()
acmPcaArn :: SourceDataProperty -> Maybe (Value Text)
x509CertificateData :: SourceDataProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
acmPcaArn :: Maybe (Value Text)
x509CertificateData :: Maybe (Value Text)
..}
= SourceDataProperty
{x509CertificateData :: Maybe (Value Text)
x509CertificateData = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "X509CertificateData" SourceDataProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
acmPcaArn :: Maybe (Value Text)
haddock_workaround_ :: ()
acmPcaArn :: Maybe (Value Text)
..}