module Stratosphere.ACMPCA.Certificate.CustomExtensionProperty (
CustomExtensionProperty(..), mkCustomExtensionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomExtensionProperty
=
CustomExtensionProperty {CustomExtensionProperty -> ()
haddock_workaround_ :: (),
CustomExtensionProperty -> Maybe (Value Bool)
critical :: (Prelude.Maybe (Value Prelude.Bool)),
CustomExtensionProperty -> Value Text
objectIdentifier :: (Value Prelude.Text),
CustomExtensionProperty -> Value Text
value :: (Value Prelude.Text)}
deriving stock (CustomExtensionProperty -> CustomExtensionProperty -> Bool
(CustomExtensionProperty -> CustomExtensionProperty -> Bool)
-> (CustomExtensionProperty -> CustomExtensionProperty -> Bool)
-> Eq CustomExtensionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomExtensionProperty -> CustomExtensionProperty -> Bool
== :: CustomExtensionProperty -> CustomExtensionProperty -> Bool
$c/= :: CustomExtensionProperty -> CustomExtensionProperty -> Bool
/= :: CustomExtensionProperty -> CustomExtensionProperty -> Bool
Prelude.Eq, Int -> CustomExtensionProperty -> ShowS
[CustomExtensionProperty] -> ShowS
CustomExtensionProperty -> String
(Int -> CustomExtensionProperty -> ShowS)
-> (CustomExtensionProperty -> String)
-> ([CustomExtensionProperty] -> ShowS)
-> Show CustomExtensionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomExtensionProperty -> ShowS
showsPrec :: Int -> CustomExtensionProperty -> ShowS
$cshow :: CustomExtensionProperty -> String
show :: CustomExtensionProperty -> String
$cshowList :: [CustomExtensionProperty] -> ShowS
showList :: [CustomExtensionProperty] -> ShowS
Prelude.Show)
mkCustomExtensionProperty ::
Value Prelude.Text -> Value Prelude.Text -> CustomExtensionProperty
mkCustomExtensionProperty :: Value Text -> Value Text -> CustomExtensionProperty
mkCustomExtensionProperty Value Text
objectIdentifier Value Text
value
= CustomExtensionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), objectIdentifier :: Value Text
objectIdentifier = Value Text
objectIdentifier,
value :: Value Text
value = Value Text
value, critical :: Maybe (Value Bool)
critical = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomExtensionProperty where
toResourceProperties :: CustomExtensionProperty -> ResourceProperties
toResourceProperties CustomExtensionProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CustomExtensionProperty -> ()
critical :: CustomExtensionProperty -> Maybe (Value Bool)
objectIdentifier :: CustomExtensionProperty -> Value Text
value :: CustomExtensionProperty -> Value Text
haddock_workaround_ :: ()
critical :: Maybe (Value Bool)
objectIdentifier :: Value Text
value :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ACMPCA::Certificate.CustomExtension",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ObjectIdentifier" 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..= Value Text
objectIdentifier,
Key
"Value" 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..= Value Text
value]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Critical" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
critical]))}
instance JSON.ToJSON CustomExtensionProperty where
toJSON :: CustomExtensionProperty -> Value
toJSON CustomExtensionProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CustomExtensionProperty -> ()
critical :: CustomExtensionProperty -> Maybe (Value Bool)
objectIdentifier :: CustomExtensionProperty -> Value Text
value :: CustomExtensionProperty -> Value Text
haddock_workaround_ :: ()
critical :: Maybe (Value Bool)
objectIdentifier :: Value Text
value :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ObjectIdentifier" 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..= Value Text
objectIdentifier,
Key
"Value" 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..= Value Text
value]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Critical" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
critical])))
instance Property "Critical" CustomExtensionProperty where
type PropertyType "Critical" CustomExtensionProperty = Value Prelude.Bool
set :: PropertyType "Critical" CustomExtensionProperty
-> CustomExtensionProperty -> CustomExtensionProperty
set PropertyType "Critical" CustomExtensionProperty
newValue CustomExtensionProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CustomExtensionProperty -> ()
critical :: CustomExtensionProperty -> Maybe (Value Bool)
objectIdentifier :: CustomExtensionProperty -> Value Text
value :: CustomExtensionProperty -> Value Text
haddock_workaround_ :: ()
critical :: Maybe (Value Bool)
objectIdentifier :: Value Text
value :: Value Text
..}
= CustomExtensionProperty {critical :: Maybe (Value Bool)
critical = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Critical" CustomExtensionProperty
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
objectIdentifier :: Value Text
value :: Value Text
haddock_workaround_ :: ()
objectIdentifier :: Value Text
value :: Value Text
..}
instance Property "ObjectIdentifier" CustomExtensionProperty where
type PropertyType "ObjectIdentifier" CustomExtensionProperty = Value Prelude.Text
set :: PropertyType "ObjectIdentifier" CustomExtensionProperty
-> CustomExtensionProperty -> CustomExtensionProperty
set PropertyType "ObjectIdentifier" CustomExtensionProperty
newValue CustomExtensionProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CustomExtensionProperty -> ()
critical :: CustomExtensionProperty -> Maybe (Value Bool)
objectIdentifier :: CustomExtensionProperty -> Value Text
value :: CustomExtensionProperty -> Value Text
haddock_workaround_ :: ()
critical :: Maybe (Value Bool)
objectIdentifier :: Value Text
value :: Value Text
..}
= CustomExtensionProperty {objectIdentifier :: Value Text
objectIdentifier = PropertyType "ObjectIdentifier" CustomExtensionProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
critical :: Maybe (Value Bool)
value :: Value Text
haddock_workaround_ :: ()
critical :: Maybe (Value Bool)
value :: Value Text
..}
instance Property "Value" CustomExtensionProperty where
type PropertyType "Value" CustomExtensionProperty = Value Prelude.Text
set :: PropertyType "Value" CustomExtensionProperty
-> CustomExtensionProperty -> CustomExtensionProperty
set PropertyType "Value" CustomExtensionProperty
newValue CustomExtensionProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CustomExtensionProperty -> ()
critical :: CustomExtensionProperty -> Maybe (Value Bool)
objectIdentifier :: CustomExtensionProperty -> Value Text
value :: CustomExtensionProperty -> Value Text
haddock_workaround_ :: ()
critical :: Maybe (Value Bool)
objectIdentifier :: Value Text
value :: Value Text
..}
= CustomExtensionProperty {value :: Value Text
value = PropertyType "Value" CustomExtensionProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
critical :: Maybe (Value Bool)
objectIdentifier :: Value Text
haddock_workaround_ :: ()
critical :: Maybe (Value Bool)
objectIdentifier :: Value Text
..}