module Stratosphere.PCAConnectorAD.Template.PrivateKeyAttributesV2Property (
        PrivateKeyAttributesV2Property(..),
        mkPrivateKeyAttributesV2Property
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PrivateKeyAttributesV2Property
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcaconnectorad-template-privatekeyattributesv2.html>
    PrivateKeyAttributesV2Property {PrivateKeyAttributesV2Property -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcaconnectorad-template-privatekeyattributesv2.html#cfn-pcaconnectorad-template-privatekeyattributesv2-cryptoproviders>
                                    PrivateKeyAttributesV2Property -> Maybe (ValueList Text)
cryptoProviders :: (Prelude.Maybe (ValueList Prelude.Text)),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcaconnectorad-template-privatekeyattributesv2.html#cfn-pcaconnectorad-template-privatekeyattributesv2-keyspec>
                                    PrivateKeyAttributesV2Property -> Value Text
keySpec :: (Value Prelude.Text),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcaconnectorad-template-privatekeyattributesv2.html#cfn-pcaconnectorad-template-privatekeyattributesv2-minimalkeylength>
                                    PrivateKeyAttributesV2Property -> Value Double
minimalKeyLength :: (Value Prelude.Double)}
  deriving stock (PrivateKeyAttributesV2Property
-> PrivateKeyAttributesV2Property -> Bool
(PrivateKeyAttributesV2Property
 -> PrivateKeyAttributesV2Property -> Bool)
-> (PrivateKeyAttributesV2Property
    -> PrivateKeyAttributesV2Property -> Bool)
-> Eq PrivateKeyAttributesV2Property
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PrivateKeyAttributesV2Property
-> PrivateKeyAttributesV2Property -> Bool
== :: PrivateKeyAttributesV2Property
-> PrivateKeyAttributesV2Property -> Bool
$c/= :: PrivateKeyAttributesV2Property
-> PrivateKeyAttributesV2Property -> Bool
/= :: PrivateKeyAttributesV2Property
-> PrivateKeyAttributesV2Property -> Bool
Prelude.Eq, Int -> PrivateKeyAttributesV2Property -> ShowS
[PrivateKeyAttributesV2Property] -> ShowS
PrivateKeyAttributesV2Property -> String
(Int -> PrivateKeyAttributesV2Property -> ShowS)
-> (PrivateKeyAttributesV2Property -> String)
-> ([PrivateKeyAttributesV2Property] -> ShowS)
-> Show PrivateKeyAttributesV2Property
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PrivateKeyAttributesV2Property -> ShowS
showsPrec :: Int -> PrivateKeyAttributesV2Property -> ShowS
$cshow :: PrivateKeyAttributesV2Property -> String
show :: PrivateKeyAttributesV2Property -> String
$cshowList :: [PrivateKeyAttributesV2Property] -> ShowS
showList :: [PrivateKeyAttributesV2Property] -> ShowS
Prelude.Show)
mkPrivateKeyAttributesV2Property ::
  Value Prelude.Text
  -> Value Prelude.Double -> PrivateKeyAttributesV2Property
mkPrivateKeyAttributesV2Property :: Value Text -> Value Double -> PrivateKeyAttributesV2Property
mkPrivateKeyAttributesV2Property Value Text
keySpec Value Double
minimalKeyLength
  = PrivateKeyAttributesV2Property
      {haddock_workaround_ :: ()
haddock_workaround_ = (), keySpec :: Value Text
keySpec = Value Text
keySpec,
       minimalKeyLength :: Value Double
minimalKeyLength = Value Double
minimalKeyLength,
       cryptoProviders :: Maybe (ValueList Text)
cryptoProviders = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PrivateKeyAttributesV2Property where
  toResourceProperties :: PrivateKeyAttributesV2Property -> ResourceProperties
toResourceProperties PrivateKeyAttributesV2Property {Maybe (ValueList Text)
()
Value Double
Value Text
haddock_workaround_ :: PrivateKeyAttributesV2Property -> ()
cryptoProviders :: PrivateKeyAttributesV2Property -> Maybe (ValueList Text)
keySpec :: PrivateKeyAttributesV2Property -> Value Text
minimalKeyLength :: PrivateKeyAttributesV2Property -> Value Double
haddock_workaround_ :: ()
cryptoProviders :: Maybe (ValueList Text)
keySpec :: Value Text
minimalKeyLength :: Value Double
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PCAConnectorAD::Template.PrivateKeyAttributesV2",
         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
"KeySpec" 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
keySpec,
                            Key
"MinimalKeyLength" Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Double
minimalKeyLength]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ValueList 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
"CryptoProviders" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
cryptoProviders]))}
instance JSON.ToJSON PrivateKeyAttributesV2Property where
  toJSON :: PrivateKeyAttributesV2Property -> Value
toJSON PrivateKeyAttributesV2Property {Maybe (ValueList Text)
()
Value Double
Value Text
haddock_workaround_ :: PrivateKeyAttributesV2Property -> ()
cryptoProviders :: PrivateKeyAttributesV2Property -> Maybe (ValueList Text)
keySpec :: PrivateKeyAttributesV2Property -> Value Text
minimalKeyLength :: PrivateKeyAttributesV2Property -> Value Double
haddock_workaround_ :: ()
cryptoProviders :: Maybe (ValueList Text)
keySpec :: Value Text
minimalKeyLength :: Value Double
..}
    = [(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
"KeySpec" 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
keySpec,
               Key
"MinimalKeyLength" Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Double
minimalKeyLength]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ValueList 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
"CryptoProviders" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
cryptoProviders])))
instance Property "CryptoProviders" PrivateKeyAttributesV2Property where
  type PropertyType "CryptoProviders" PrivateKeyAttributesV2Property = ValueList Prelude.Text
  set :: PropertyType "CryptoProviders" PrivateKeyAttributesV2Property
-> PrivateKeyAttributesV2Property -> PrivateKeyAttributesV2Property
set PropertyType "CryptoProviders" PrivateKeyAttributesV2Property
newValue PrivateKeyAttributesV2Property {Maybe (ValueList Text)
()
Value Double
Value Text
haddock_workaround_ :: PrivateKeyAttributesV2Property -> ()
cryptoProviders :: PrivateKeyAttributesV2Property -> Maybe (ValueList Text)
keySpec :: PrivateKeyAttributesV2Property -> Value Text
minimalKeyLength :: PrivateKeyAttributesV2Property -> Value Double
haddock_workaround_ :: ()
cryptoProviders :: Maybe (ValueList Text)
keySpec :: Value Text
minimalKeyLength :: Value Double
..}
    = PrivateKeyAttributesV2Property
        {cryptoProviders :: Maybe (ValueList Text)
cryptoProviders = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CryptoProviders" PrivateKeyAttributesV2Property
ValueList Text
newValue, ()
Value Double
Value Text
haddock_workaround_ :: ()
keySpec :: Value Text
minimalKeyLength :: Value Double
haddock_workaround_ :: ()
keySpec :: Value Text
minimalKeyLength :: Value Double
..}
instance Property "KeySpec" PrivateKeyAttributesV2Property where
  type PropertyType "KeySpec" PrivateKeyAttributesV2Property = Value Prelude.Text
  set :: PropertyType "KeySpec" PrivateKeyAttributesV2Property
-> PrivateKeyAttributesV2Property -> PrivateKeyAttributesV2Property
set PropertyType "KeySpec" PrivateKeyAttributesV2Property
newValue PrivateKeyAttributesV2Property {Maybe (ValueList Text)
()
Value Double
Value Text
haddock_workaround_ :: PrivateKeyAttributesV2Property -> ()
cryptoProviders :: PrivateKeyAttributesV2Property -> Maybe (ValueList Text)
keySpec :: PrivateKeyAttributesV2Property -> Value Text
minimalKeyLength :: PrivateKeyAttributesV2Property -> Value Double
haddock_workaround_ :: ()
cryptoProviders :: Maybe (ValueList Text)
keySpec :: Value Text
minimalKeyLength :: Value Double
..}
    = PrivateKeyAttributesV2Property {keySpec :: Value Text
keySpec = PropertyType "KeySpec" PrivateKeyAttributesV2Property
Value Text
newValue, Maybe (ValueList Text)
()
Value Double
haddock_workaround_ :: ()
cryptoProviders :: Maybe (ValueList Text)
minimalKeyLength :: Value Double
haddock_workaround_ :: ()
cryptoProviders :: Maybe (ValueList Text)
minimalKeyLength :: Value Double
..}
instance Property "MinimalKeyLength" PrivateKeyAttributesV2Property where
  type PropertyType "MinimalKeyLength" PrivateKeyAttributesV2Property = Value Prelude.Double
  set :: PropertyType "MinimalKeyLength" PrivateKeyAttributesV2Property
-> PrivateKeyAttributesV2Property -> PrivateKeyAttributesV2Property
set PropertyType "MinimalKeyLength" PrivateKeyAttributesV2Property
newValue PrivateKeyAttributesV2Property {Maybe (ValueList Text)
()
Value Double
Value Text
haddock_workaround_ :: PrivateKeyAttributesV2Property -> ()
cryptoProviders :: PrivateKeyAttributesV2Property -> Maybe (ValueList Text)
keySpec :: PrivateKeyAttributesV2Property -> Value Text
minimalKeyLength :: PrivateKeyAttributesV2Property -> Value Double
haddock_workaround_ :: ()
cryptoProviders :: Maybe (ValueList Text)
keySpec :: Value Text
minimalKeyLength :: Value Double
..}
    = PrivateKeyAttributesV2Property {minimalKeyLength :: Value Double
minimalKeyLength = PropertyType "MinimalKeyLength" PrivateKeyAttributesV2Property
Value Double
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
cryptoProviders :: Maybe (ValueList Text)
keySpec :: Value Text
haddock_workaround_ :: ()
cryptoProviders :: Maybe (ValueList Text)
keySpec :: Value Text
..}