module Stratosphere.VpcLattice.Service.DnsEntryProperty (
        DnsEntryProperty(..), mkDnsEntryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DnsEntryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-service-dnsentry.html>
    DnsEntryProperty {DnsEntryProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-service-dnsentry.html#cfn-vpclattice-service-dnsentry-domainname>
                      DnsEntryProperty -> Maybe (Value Text)
domainName :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-service-dnsentry.html#cfn-vpclattice-service-dnsentry-hostedzoneid>
                      DnsEntryProperty -> Maybe (Value Text)
hostedZoneId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DnsEntryProperty -> DnsEntryProperty -> Bool
(DnsEntryProperty -> DnsEntryProperty -> Bool)
-> (DnsEntryProperty -> DnsEntryProperty -> Bool)
-> Eq DnsEntryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DnsEntryProperty -> DnsEntryProperty -> Bool
== :: DnsEntryProperty -> DnsEntryProperty -> Bool
$c/= :: DnsEntryProperty -> DnsEntryProperty -> Bool
/= :: DnsEntryProperty -> DnsEntryProperty -> Bool
Prelude.Eq, Int -> DnsEntryProperty -> ShowS
[DnsEntryProperty] -> ShowS
DnsEntryProperty -> String
(Int -> DnsEntryProperty -> ShowS)
-> (DnsEntryProperty -> String)
-> ([DnsEntryProperty] -> ShowS)
-> Show DnsEntryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DnsEntryProperty -> ShowS
showsPrec :: Int -> DnsEntryProperty -> ShowS
$cshow :: DnsEntryProperty -> String
show :: DnsEntryProperty -> String
$cshowList :: [DnsEntryProperty] -> ShowS
showList :: [DnsEntryProperty] -> ShowS
Prelude.Show)
mkDnsEntryProperty :: DnsEntryProperty
mkDnsEntryProperty :: DnsEntryProperty
mkDnsEntryProperty
  = DnsEntryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), domainName :: Maybe (Value Text)
domainName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       hostedZoneId :: Maybe (Value Text)
hostedZoneId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DnsEntryProperty where
  toResourceProperties :: DnsEntryProperty -> ResourceProperties
toResourceProperties DnsEntryProperty {Maybe (Value Text)
()
haddock_workaround_ :: DnsEntryProperty -> ()
domainName :: DnsEntryProperty -> Maybe (Value Text)
hostedZoneId :: DnsEntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domainName :: Maybe (Value Text)
hostedZoneId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::VpcLattice::Service.DnsEntry",
         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
"DomainName" (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)
domainName,
                            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
"HostedZoneId" (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)
hostedZoneId])}
instance JSON.ToJSON DnsEntryProperty where
  toJSON :: DnsEntryProperty -> Value
toJSON DnsEntryProperty {Maybe (Value Text)
()
haddock_workaround_ :: DnsEntryProperty -> ()
domainName :: DnsEntryProperty -> Maybe (Value Text)
hostedZoneId :: DnsEntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domainName :: Maybe (Value Text)
hostedZoneId :: 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
"DomainName" (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)
domainName,
               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
"HostedZoneId" (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)
hostedZoneId]))
instance Property "DomainName" DnsEntryProperty where
  type PropertyType "DomainName" DnsEntryProperty = Value Prelude.Text
  set :: PropertyType "DomainName" DnsEntryProperty
-> DnsEntryProperty -> DnsEntryProperty
set PropertyType "DomainName" DnsEntryProperty
newValue DnsEntryProperty {Maybe (Value Text)
()
haddock_workaround_ :: DnsEntryProperty -> ()
domainName :: DnsEntryProperty -> Maybe (Value Text)
hostedZoneId :: DnsEntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domainName :: Maybe (Value Text)
hostedZoneId :: Maybe (Value Text)
..}
    = DnsEntryProperty {domainName :: Maybe (Value Text)
domainName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DomainName" DnsEntryProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
hostedZoneId :: Maybe (Value Text)
haddock_workaround_ :: ()
hostedZoneId :: Maybe (Value Text)
..}
instance Property "HostedZoneId" DnsEntryProperty where
  type PropertyType "HostedZoneId" DnsEntryProperty = Value Prelude.Text
  set :: PropertyType "HostedZoneId" DnsEntryProperty
-> DnsEntryProperty -> DnsEntryProperty
set PropertyType "HostedZoneId" DnsEntryProperty
newValue DnsEntryProperty {Maybe (Value Text)
()
haddock_workaround_ :: DnsEntryProperty -> ()
domainName :: DnsEntryProperty -> Maybe (Value Text)
hostedZoneId :: DnsEntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
domainName :: Maybe (Value Text)
hostedZoneId :: Maybe (Value Text)
..}
    = DnsEntryProperty {hostedZoneId :: Maybe (Value Text)
hostedZoneId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HostedZoneId" DnsEntryProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
domainName :: Maybe (Value Text)
haddock_workaround_ :: ()
domainName :: Maybe (Value Text)
..}