module Stratosphere.Amplify.Domain.CertificateSettingsProperty (
        CertificateSettingsProperty(..), mkCertificateSettingsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CertificateSettingsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-domain-certificatesettings.html>
    CertificateSettingsProperty {CertificateSettingsProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-domain-certificatesettings.html#cfn-amplify-domain-certificatesettings-certificatetype>
                                 CertificateSettingsProperty -> Maybe (Value Text)
certificateType :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-domain-certificatesettings.html#cfn-amplify-domain-certificatesettings-customcertificatearn>
                                 CertificateSettingsProperty -> Maybe (Value Text)
customCertificateArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CertificateSettingsProperty -> CertificateSettingsProperty -> Bool
(CertificateSettingsProperty
 -> CertificateSettingsProperty -> Bool)
-> (CertificateSettingsProperty
    -> CertificateSettingsProperty -> Bool)
-> Eq CertificateSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CertificateSettingsProperty -> CertificateSettingsProperty -> Bool
== :: CertificateSettingsProperty -> CertificateSettingsProperty -> Bool
$c/= :: CertificateSettingsProperty -> CertificateSettingsProperty -> Bool
/= :: CertificateSettingsProperty -> CertificateSettingsProperty -> Bool
Prelude.Eq, Int -> CertificateSettingsProperty -> ShowS
[CertificateSettingsProperty] -> ShowS
CertificateSettingsProperty -> String
(Int -> CertificateSettingsProperty -> ShowS)
-> (CertificateSettingsProperty -> String)
-> ([CertificateSettingsProperty] -> ShowS)
-> Show CertificateSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CertificateSettingsProperty -> ShowS
showsPrec :: Int -> CertificateSettingsProperty -> ShowS
$cshow :: CertificateSettingsProperty -> String
show :: CertificateSettingsProperty -> String
$cshowList :: [CertificateSettingsProperty] -> ShowS
showList :: [CertificateSettingsProperty] -> ShowS
Prelude.Show)
mkCertificateSettingsProperty :: CertificateSettingsProperty
mkCertificateSettingsProperty :: CertificateSettingsProperty
mkCertificateSettingsProperty
  = CertificateSettingsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), certificateType :: Maybe (Value Text)
certificateType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       customCertificateArn :: Maybe (Value Text)
customCertificateArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CertificateSettingsProperty where
  toResourceProperties :: CertificateSettingsProperty -> ResourceProperties
toResourceProperties CertificateSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CertificateSettingsProperty -> ()
certificateType :: CertificateSettingsProperty -> Maybe (Value Text)
customCertificateArn :: CertificateSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateType :: Maybe (Value Text)
customCertificateArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Amplify::Domain.CertificateSettings",
         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
"CertificateType" (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)
certificateType,
                            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
"CustomCertificateArn"
                              (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)
customCertificateArn])}
instance JSON.ToJSON CertificateSettingsProperty where
  toJSON :: CertificateSettingsProperty -> Value
toJSON CertificateSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CertificateSettingsProperty -> ()
certificateType :: CertificateSettingsProperty -> Maybe (Value Text)
customCertificateArn :: CertificateSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateType :: Maybe (Value Text)
customCertificateArn :: 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
"CertificateType" (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)
certificateType,
               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
"CustomCertificateArn"
                 (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)
customCertificateArn]))
instance Property "CertificateType" CertificateSettingsProperty where
  type PropertyType "CertificateType" CertificateSettingsProperty = Value Prelude.Text
  set :: PropertyType "CertificateType" CertificateSettingsProperty
-> CertificateSettingsProperty -> CertificateSettingsProperty
set PropertyType "CertificateType" CertificateSettingsProperty
newValue CertificateSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CertificateSettingsProperty -> ()
certificateType :: CertificateSettingsProperty -> Maybe (Value Text)
customCertificateArn :: CertificateSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateType :: Maybe (Value Text)
customCertificateArn :: Maybe (Value Text)
..}
    = CertificateSettingsProperty
        {certificateType :: Maybe (Value Text)
certificateType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CertificateType" CertificateSettingsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
customCertificateArn :: Maybe (Value Text)
haddock_workaround_ :: ()
customCertificateArn :: Maybe (Value Text)
..}
instance Property "CustomCertificateArn" CertificateSettingsProperty where
  type PropertyType "CustomCertificateArn" CertificateSettingsProperty = Value Prelude.Text
  set :: PropertyType "CustomCertificateArn" CertificateSettingsProperty
-> CertificateSettingsProperty -> CertificateSettingsProperty
set PropertyType "CustomCertificateArn" CertificateSettingsProperty
newValue CertificateSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CertificateSettingsProperty -> ()
certificateType :: CertificateSettingsProperty -> Maybe (Value Text)
customCertificateArn :: CertificateSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateType :: Maybe (Value Text)
customCertificateArn :: Maybe (Value Text)
..}
    = CertificateSettingsProperty
        {customCertificateArn :: Maybe (Value Text)
customCertificateArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CustomCertificateArn" CertificateSettingsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
certificateType :: Maybe (Value Text)
haddock_workaround_ :: ()
certificateType :: Maybe (Value Text)
..}