module Stratosphere.Lightsail.Container.PublicDomainNameProperty (
        PublicDomainNameProperty(..), mkPublicDomainNameProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PublicDomainNameProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicdomainname.html>
    PublicDomainNameProperty {PublicDomainNameProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicdomainname.html#cfn-lightsail-container-publicdomainname-certificatename>
                              PublicDomainNameProperty -> Maybe (Value Text)
certificateName :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-publicdomainname.html#cfn-lightsail-container-publicdomainname-domainnames>
                              PublicDomainNameProperty -> Maybe (ValueList Text)
domainNames :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (PublicDomainNameProperty -> PublicDomainNameProperty -> Bool
(PublicDomainNameProperty -> PublicDomainNameProperty -> Bool)
-> (PublicDomainNameProperty -> PublicDomainNameProperty -> Bool)
-> Eq PublicDomainNameProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PublicDomainNameProperty -> PublicDomainNameProperty -> Bool
== :: PublicDomainNameProperty -> PublicDomainNameProperty -> Bool
$c/= :: PublicDomainNameProperty -> PublicDomainNameProperty -> Bool
/= :: PublicDomainNameProperty -> PublicDomainNameProperty -> Bool
Prelude.Eq, Int -> PublicDomainNameProperty -> ShowS
[PublicDomainNameProperty] -> ShowS
PublicDomainNameProperty -> String
(Int -> PublicDomainNameProperty -> ShowS)
-> (PublicDomainNameProperty -> String)
-> ([PublicDomainNameProperty] -> ShowS)
-> Show PublicDomainNameProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PublicDomainNameProperty -> ShowS
showsPrec :: Int -> PublicDomainNameProperty -> ShowS
$cshow :: PublicDomainNameProperty -> String
show :: PublicDomainNameProperty -> String
$cshowList :: [PublicDomainNameProperty] -> ShowS
showList :: [PublicDomainNameProperty] -> ShowS
Prelude.Show)
mkPublicDomainNameProperty :: PublicDomainNameProperty
mkPublicDomainNameProperty :: PublicDomainNameProperty
mkPublicDomainNameProperty
  = PublicDomainNameProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), certificateName :: Maybe (Value Text)
certificateName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       domainNames :: Maybe (ValueList Text)
domainNames = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PublicDomainNameProperty where
  toResourceProperties :: PublicDomainNameProperty -> ResourceProperties
toResourceProperties PublicDomainNameProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: PublicDomainNameProperty -> ()
certificateName :: PublicDomainNameProperty -> Maybe (Value Text)
domainNames :: PublicDomainNameProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
certificateName :: Maybe (Value Text)
domainNames :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lightsail::Container.PublicDomainName",
         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
"CertificateName" (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)
certificateName,
                            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
"DomainNames" (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)
domainNames])}
instance JSON.ToJSON PublicDomainNameProperty where
  toJSON :: PublicDomainNameProperty -> Value
toJSON PublicDomainNameProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: PublicDomainNameProperty -> ()
certificateName :: PublicDomainNameProperty -> Maybe (Value Text)
domainNames :: PublicDomainNameProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
certificateName :: Maybe (Value Text)
domainNames :: Maybe (ValueList 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
"CertificateName" (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)
certificateName,
               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
"DomainNames" (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)
domainNames]))
instance Property "CertificateName" PublicDomainNameProperty where
  type PropertyType "CertificateName" PublicDomainNameProperty = Value Prelude.Text
  set :: PropertyType "CertificateName" PublicDomainNameProperty
-> PublicDomainNameProperty -> PublicDomainNameProperty
set PropertyType "CertificateName" PublicDomainNameProperty
newValue PublicDomainNameProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: PublicDomainNameProperty -> ()
certificateName :: PublicDomainNameProperty -> Maybe (Value Text)
domainNames :: PublicDomainNameProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
certificateName :: Maybe (Value Text)
domainNames :: Maybe (ValueList Text)
..}
    = PublicDomainNameProperty
        {certificateName :: Maybe (Value Text)
certificateName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CertificateName" PublicDomainNameProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
domainNames :: Maybe (ValueList Text)
haddock_workaround_ :: ()
domainNames :: Maybe (ValueList Text)
..}
instance Property "DomainNames" PublicDomainNameProperty where
  type PropertyType "DomainNames" PublicDomainNameProperty = ValueList Prelude.Text
  set :: PropertyType "DomainNames" PublicDomainNameProperty
-> PublicDomainNameProperty -> PublicDomainNameProperty
set PropertyType "DomainNames" PublicDomainNameProperty
newValue PublicDomainNameProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: PublicDomainNameProperty -> ()
certificateName :: PublicDomainNameProperty -> Maybe (Value Text)
domainNames :: PublicDomainNameProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
certificateName :: Maybe (Value Text)
domainNames :: Maybe (ValueList Text)
..}
    = PublicDomainNameProperty
        {domainNames :: Maybe (ValueList Text)
domainNames = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DomainNames" PublicDomainNameProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
certificateName :: Maybe (Value Text)
haddock_workaround_ :: ()
certificateName :: Maybe (Value Text)
..}