module Stratosphere.ACMPCA.CertificateAuthority.OcspConfigurationProperty (
        OcspConfigurationProperty(..), mkOcspConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data OcspConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-ocspconfiguration.html>
    OcspConfigurationProperty {OcspConfigurationProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-ocspconfiguration.html#cfn-acmpca-certificateauthority-ocspconfiguration-enabled>
                               OcspConfigurationProperty -> Value Bool
enabled :: (Value Prelude.Bool),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-ocspconfiguration.html#cfn-acmpca-certificateauthority-ocspconfiguration-ocspcustomcname>
                               OcspConfigurationProperty -> Maybe (Value Text)
ocspCustomCname :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (OcspConfigurationProperty -> OcspConfigurationProperty -> Bool
(OcspConfigurationProperty -> OcspConfigurationProperty -> Bool)
-> (OcspConfigurationProperty -> OcspConfigurationProperty -> Bool)
-> Eq OcspConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OcspConfigurationProperty -> OcspConfigurationProperty -> Bool
== :: OcspConfigurationProperty -> OcspConfigurationProperty -> Bool
$c/= :: OcspConfigurationProperty -> OcspConfigurationProperty -> Bool
/= :: OcspConfigurationProperty -> OcspConfigurationProperty -> Bool
Prelude.Eq, Int -> OcspConfigurationProperty -> ShowS
[OcspConfigurationProperty] -> ShowS
OcspConfigurationProperty -> String
(Int -> OcspConfigurationProperty -> ShowS)
-> (OcspConfigurationProperty -> String)
-> ([OcspConfigurationProperty] -> ShowS)
-> Show OcspConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OcspConfigurationProperty -> ShowS
showsPrec :: Int -> OcspConfigurationProperty -> ShowS
$cshow :: OcspConfigurationProperty -> String
show :: OcspConfigurationProperty -> String
$cshowList :: [OcspConfigurationProperty] -> ShowS
showList :: [OcspConfigurationProperty] -> ShowS
Prelude.Show)
mkOcspConfigurationProperty ::
  Value Prelude.Bool -> OcspConfigurationProperty
mkOcspConfigurationProperty :: Value Bool -> OcspConfigurationProperty
mkOcspConfigurationProperty Value Bool
enabled
  = OcspConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Value Bool
enabled = Value Bool
enabled,
       ocspCustomCname :: Maybe (Value Text)
ocspCustomCname = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OcspConfigurationProperty where
  toResourceProperties :: OcspConfigurationProperty -> ResourceProperties
toResourceProperties OcspConfigurationProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: OcspConfigurationProperty -> ()
enabled :: OcspConfigurationProperty -> Value Bool
ocspCustomCname :: OcspConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Value Bool
ocspCustomCname :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ACMPCA::CertificateAuthority.OcspConfiguration",
         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
"Enabled" 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..= Value Bool
enabled]
                           ([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
"OcspCustomCname" (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)
ocspCustomCname]))}
instance JSON.ToJSON OcspConfigurationProperty where
  toJSON :: OcspConfigurationProperty -> Value
toJSON OcspConfigurationProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: OcspConfigurationProperty -> ()
enabled :: OcspConfigurationProperty -> Value Bool
ocspCustomCname :: OcspConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Value Bool
ocspCustomCname :: Maybe (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
"Enabled" 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..= Value Bool
enabled]
              ([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
"OcspCustomCname" (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)
ocspCustomCname])))
instance Property "Enabled" OcspConfigurationProperty where
  type PropertyType "Enabled" OcspConfigurationProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" OcspConfigurationProperty
-> OcspConfigurationProperty -> OcspConfigurationProperty
set PropertyType "Enabled" OcspConfigurationProperty
newValue OcspConfigurationProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: OcspConfigurationProperty -> ()
enabled :: OcspConfigurationProperty -> Value Bool
ocspCustomCname :: OcspConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Value Bool
ocspCustomCname :: Maybe (Value Text)
..}
    = OcspConfigurationProperty {enabled :: Value Bool
enabled = PropertyType "Enabled" OcspConfigurationProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
ocspCustomCname :: Maybe (Value Text)
haddock_workaround_ :: ()
ocspCustomCname :: Maybe (Value Text)
..}
instance Property "OcspCustomCname" OcspConfigurationProperty where
  type PropertyType "OcspCustomCname" OcspConfigurationProperty = Value Prelude.Text
  set :: PropertyType "OcspCustomCname" OcspConfigurationProperty
-> OcspConfigurationProperty -> OcspConfigurationProperty
set PropertyType "OcspCustomCname" OcspConfigurationProperty
newValue OcspConfigurationProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: OcspConfigurationProperty -> ()
enabled :: OcspConfigurationProperty -> Value Bool
ocspCustomCname :: OcspConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Value Bool
ocspCustomCname :: Maybe (Value Text)
..}
    = OcspConfigurationProperty
        {ocspCustomCname :: Maybe (Value Text)
ocspCustomCname = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OcspCustomCname" OcspConfigurationProperty
Value Text
newValue, ()
Value Bool
haddock_workaround_ :: ()
enabled :: Value Bool
haddock_workaround_ :: ()
enabled :: Value Bool
..}