module Stratosphere.Cognito.UserPoolDomain.CustomDomainConfigTypeProperty (
        CustomDomainConfigTypeProperty(..),
        mkCustomDomainConfigTypeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomDomainConfigTypeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpooldomain-customdomainconfigtype.html>
    CustomDomainConfigTypeProperty {CustomDomainConfigTypeProperty -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpooldomain-customdomainconfigtype.html#cfn-cognito-userpooldomain-customdomainconfigtype-certificatearn>
                                    CustomDomainConfigTypeProperty -> Maybe (Value Text)
certificateArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CustomDomainConfigTypeProperty
-> CustomDomainConfigTypeProperty -> Bool
(CustomDomainConfigTypeProperty
 -> CustomDomainConfigTypeProperty -> Bool)
-> (CustomDomainConfigTypeProperty
    -> CustomDomainConfigTypeProperty -> Bool)
-> Eq CustomDomainConfigTypeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomDomainConfigTypeProperty
-> CustomDomainConfigTypeProperty -> Bool
== :: CustomDomainConfigTypeProperty
-> CustomDomainConfigTypeProperty -> Bool
$c/= :: CustomDomainConfigTypeProperty
-> CustomDomainConfigTypeProperty -> Bool
/= :: CustomDomainConfigTypeProperty
-> CustomDomainConfigTypeProperty -> Bool
Prelude.Eq, Int -> CustomDomainConfigTypeProperty -> ShowS
[CustomDomainConfigTypeProperty] -> ShowS
CustomDomainConfigTypeProperty -> String
(Int -> CustomDomainConfigTypeProperty -> ShowS)
-> (CustomDomainConfigTypeProperty -> String)
-> ([CustomDomainConfigTypeProperty] -> ShowS)
-> Show CustomDomainConfigTypeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomDomainConfigTypeProperty -> ShowS
showsPrec :: Int -> CustomDomainConfigTypeProperty -> ShowS
$cshow :: CustomDomainConfigTypeProperty -> String
show :: CustomDomainConfigTypeProperty -> String
$cshowList :: [CustomDomainConfigTypeProperty] -> ShowS
showList :: [CustomDomainConfigTypeProperty] -> ShowS
Prelude.Show)
mkCustomDomainConfigTypeProperty :: CustomDomainConfigTypeProperty
mkCustomDomainConfigTypeProperty :: CustomDomainConfigTypeProperty
mkCustomDomainConfigTypeProperty
  = CustomDomainConfigTypeProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), certificateArn :: Maybe (Value Text)
certificateArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomDomainConfigTypeProperty where
  toResourceProperties :: CustomDomainConfigTypeProperty -> ResourceProperties
toResourceProperties CustomDomainConfigTypeProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomDomainConfigTypeProperty -> ()
certificateArn :: CustomDomainConfigTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::UserPoolDomain.CustomDomainConfigType",
         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
"CertificateArn" (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)
certificateArn])}
instance JSON.ToJSON CustomDomainConfigTypeProperty where
  toJSON :: CustomDomainConfigTypeProperty -> Value
toJSON CustomDomainConfigTypeProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomDomainConfigTypeProperty -> ()
certificateArn :: CustomDomainConfigTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: 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
"CertificateArn" (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)
certificateArn]))
instance Property "CertificateArn" CustomDomainConfigTypeProperty where
  type PropertyType "CertificateArn" CustomDomainConfigTypeProperty = Value Prelude.Text
  set :: PropertyType "CertificateArn" CustomDomainConfigTypeProperty
-> CustomDomainConfigTypeProperty -> CustomDomainConfigTypeProperty
set PropertyType "CertificateArn" CustomDomainConfigTypeProperty
newValue CustomDomainConfigTypeProperty {Maybe (Value Text)
()
haddock_workaround_ :: CustomDomainConfigTypeProperty -> ()
certificateArn :: CustomDomainConfigTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
certificateArn :: Maybe (Value Text)
..}
    = CustomDomainConfigTypeProperty
        {certificateArn :: Maybe (Value Text)
certificateArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CertificateArn" CustomDomainConfigTypeProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}