module Stratosphere.IoT.AccountAuditConfiguration.CertAgeCheckCustomConfigurationProperty (
        CertAgeCheckCustomConfigurationProperty(..),
        mkCertAgeCheckCustomConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CertAgeCheckCustomConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-accountauditconfiguration-certagecheckcustomconfiguration.html>
    CertAgeCheckCustomConfigurationProperty {CertAgeCheckCustomConfigurationProperty -> ()
haddock_workaround_ :: (),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-accountauditconfiguration-certagecheckcustomconfiguration.html#cfn-iot-accountauditconfiguration-certagecheckcustomconfiguration-certagethresholdindays>
                                             CertAgeCheckCustomConfigurationProperty -> Maybe (Value Text)
certAgeThresholdInDays :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CertAgeCheckCustomConfigurationProperty
-> CertAgeCheckCustomConfigurationProperty -> Bool
(CertAgeCheckCustomConfigurationProperty
 -> CertAgeCheckCustomConfigurationProperty -> Bool)
-> (CertAgeCheckCustomConfigurationProperty
    -> CertAgeCheckCustomConfigurationProperty -> Bool)
-> Eq CertAgeCheckCustomConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CertAgeCheckCustomConfigurationProperty
-> CertAgeCheckCustomConfigurationProperty -> Bool
== :: CertAgeCheckCustomConfigurationProperty
-> CertAgeCheckCustomConfigurationProperty -> Bool
$c/= :: CertAgeCheckCustomConfigurationProperty
-> CertAgeCheckCustomConfigurationProperty -> Bool
/= :: CertAgeCheckCustomConfigurationProperty
-> CertAgeCheckCustomConfigurationProperty -> Bool
Prelude.Eq, Int -> CertAgeCheckCustomConfigurationProperty -> ShowS
[CertAgeCheckCustomConfigurationProperty] -> ShowS
CertAgeCheckCustomConfigurationProperty -> String
(Int -> CertAgeCheckCustomConfigurationProperty -> ShowS)
-> (CertAgeCheckCustomConfigurationProperty -> String)
-> ([CertAgeCheckCustomConfigurationProperty] -> ShowS)
-> Show CertAgeCheckCustomConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CertAgeCheckCustomConfigurationProperty -> ShowS
showsPrec :: Int -> CertAgeCheckCustomConfigurationProperty -> ShowS
$cshow :: CertAgeCheckCustomConfigurationProperty -> String
show :: CertAgeCheckCustomConfigurationProperty -> String
$cshowList :: [CertAgeCheckCustomConfigurationProperty] -> ShowS
showList :: [CertAgeCheckCustomConfigurationProperty] -> ShowS
Prelude.Show)
mkCertAgeCheckCustomConfigurationProperty ::
  CertAgeCheckCustomConfigurationProperty
mkCertAgeCheckCustomConfigurationProperty :: CertAgeCheckCustomConfigurationProperty
mkCertAgeCheckCustomConfigurationProperty
  = CertAgeCheckCustomConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       certAgeThresholdInDays :: Maybe (Value Text)
certAgeThresholdInDays = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CertAgeCheckCustomConfigurationProperty where
  toResourceProperties :: CertAgeCheckCustomConfigurationProperty -> ResourceProperties
toResourceProperties CertAgeCheckCustomConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: CertAgeCheckCustomConfigurationProperty -> ()
certAgeThresholdInDays :: CertAgeCheckCustomConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certAgeThresholdInDays :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::AccountAuditConfiguration.CertAgeCheckCustomConfiguration",
         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
"CertAgeThresholdInDays"
                              (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)
certAgeThresholdInDays])}
instance JSON.ToJSON CertAgeCheckCustomConfigurationProperty where
  toJSON :: CertAgeCheckCustomConfigurationProperty -> Value
toJSON CertAgeCheckCustomConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: CertAgeCheckCustomConfigurationProperty -> ()
certAgeThresholdInDays :: CertAgeCheckCustomConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certAgeThresholdInDays :: 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
"CertAgeThresholdInDays"
                 (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)
certAgeThresholdInDays]))
instance Property "CertAgeThresholdInDays" CertAgeCheckCustomConfigurationProperty where
  type PropertyType "CertAgeThresholdInDays" CertAgeCheckCustomConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "CertAgeThresholdInDays" CertAgeCheckCustomConfigurationProperty
-> CertAgeCheckCustomConfigurationProperty
-> CertAgeCheckCustomConfigurationProperty
set PropertyType
  "CertAgeThresholdInDays" CertAgeCheckCustomConfigurationProperty
newValue CertAgeCheckCustomConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: CertAgeCheckCustomConfigurationProperty -> ()
certAgeThresholdInDays :: CertAgeCheckCustomConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certAgeThresholdInDays :: Maybe (Value Text)
..}
    = CertAgeCheckCustomConfigurationProperty
        {certAgeThresholdInDays :: Maybe (Value Text)
certAgeThresholdInDays = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CertAgeThresholdInDays" CertAgeCheckCustomConfigurationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}