module Stratosphere.VoiceID.Domain (
        module Exports, Domain(..), mkDomain
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.VoiceID.Domain.ServerSideEncryptionConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Domain
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html>
    Domain {Domain -> ()
haddock_workaround_ :: (),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html#cfn-voiceid-domain-description>
            Domain -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html#cfn-voiceid-domain-name>
            Domain -> Value Text
name :: (Value Prelude.Text),
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html#cfn-voiceid-domain-serversideencryptionconfiguration>
            Domain -> ServerSideEncryptionConfigurationProperty
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty,
            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-voiceid-domain.html#cfn-voiceid-domain-tags>
            Domain -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (Domain -> Domain -> Bool
(Domain -> Domain -> Bool)
-> (Domain -> Domain -> Bool) -> Eq Domain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Domain -> Domain -> Bool
== :: Domain -> Domain -> Bool
$c/= :: Domain -> Domain -> Bool
/= :: Domain -> Domain -> Bool
Prelude.Eq, Int -> Domain -> ShowS
[Domain] -> ShowS
Domain -> String
(Int -> Domain -> ShowS)
-> (Domain -> String) -> ([Domain] -> ShowS) -> Show Domain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Domain -> ShowS
showsPrec :: Int -> Domain -> ShowS
$cshow :: Domain -> String
show :: Domain -> String
$cshowList :: [Domain] -> ShowS
showList :: [Domain] -> ShowS
Prelude.Show)
mkDomain ::
  Value Prelude.Text
  -> ServerSideEncryptionConfigurationProperty -> Domain
mkDomain :: Value Text -> ServerSideEncryptionConfigurationProperty -> Domain
mkDomain Value Text
name ServerSideEncryptionConfigurationProperty
serverSideEncryptionConfiguration
  = Domain
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
serverSideEncryptionConfiguration = ServerSideEncryptionConfigurationProperty
serverSideEncryptionConfiguration,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Domain where
  toResourceProperties :: Domain -> ResourceProperties
toResourceProperties Domain {Maybe [Tag]
Maybe (Value Text)
()
Value Text
ServerSideEncryptionConfigurationProperty
haddock_workaround_ :: Domain -> ()
description :: Domain -> Maybe (Value Text)
name :: Domain -> Value Text
serverSideEncryptionConfiguration :: Domain -> ServerSideEncryptionConfigurationProperty
tags :: Domain -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::VoiceID::Domain", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"Name" 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..= Value Text
name,
                            Key
"ServerSideEncryptionConfiguration"
                              Key -> ServerSideEncryptionConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ServerSideEncryptionConfigurationProperty
serverSideEncryptionConfiguration]
                           ([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
"Description" (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)
description,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Domain where
  toJSON :: Domain -> Value
toJSON Domain {Maybe [Tag]
Maybe (Value Text)
()
Value Text
ServerSideEncryptionConfigurationProperty
haddock_workaround_ :: Domain -> ()
description :: Domain -> Maybe (Value Text)
name :: Domain -> Value Text
serverSideEncryptionConfiguration :: Domain -> ServerSideEncryptionConfigurationProperty
tags :: Domain -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
tags :: Maybe [Tag]
..}
    = [(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
"Name" 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..= Value Text
name,
               Key
"ServerSideEncryptionConfiguration"
                 Key -> ServerSideEncryptionConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ServerSideEncryptionConfigurationProperty
serverSideEncryptionConfiguration]
              ([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
"Description" (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)
description,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Description" Domain where
  type PropertyType "Description" Domain = Value Prelude.Text
  set :: PropertyType "Description" Domain -> Domain -> Domain
set PropertyType "Description" Domain
newValue Domain {Maybe [Tag]
Maybe (Value Text)
()
Value Text
ServerSideEncryptionConfigurationProperty
haddock_workaround_ :: Domain -> ()
description :: Domain -> Maybe (Value Text)
name :: Domain -> Value Text
serverSideEncryptionConfiguration :: Domain -> ServerSideEncryptionConfigurationProperty
tags :: Domain -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
tags :: Maybe [Tag]
..}
    = Domain {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Domain
Value Text
newValue, Maybe [Tag]
()
Value Text
ServerSideEncryptionConfigurationProperty
haddock_workaround_ :: ()
name :: Value Text
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
tags :: Maybe [Tag]
..}
instance Property "Name" Domain where
  type PropertyType "Name" Domain = Value Prelude.Text
  set :: PropertyType "Name" Domain -> Domain -> Domain
set PropertyType "Name" Domain
newValue Domain {Maybe [Tag]
Maybe (Value Text)
()
Value Text
ServerSideEncryptionConfigurationProperty
haddock_workaround_ :: Domain -> ()
description :: Domain -> Maybe (Value Text)
name :: Domain -> Value Text
serverSideEncryptionConfiguration :: Domain -> ServerSideEncryptionConfigurationProperty
tags :: Domain -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
tags :: Maybe [Tag]
..} = Domain {name :: Value Text
name = PropertyType "Name" Domain
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
ServerSideEncryptionConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
tags :: Maybe [Tag]
..}
instance Property "ServerSideEncryptionConfiguration" Domain where
  type PropertyType "ServerSideEncryptionConfiguration" Domain = ServerSideEncryptionConfigurationProperty
  set :: PropertyType "ServerSideEncryptionConfiguration" Domain
-> Domain -> Domain
set PropertyType "ServerSideEncryptionConfiguration" Domain
newValue Domain {Maybe [Tag]
Maybe (Value Text)
()
Value Text
ServerSideEncryptionConfigurationProperty
haddock_workaround_ :: Domain -> ()
description :: Domain -> Maybe (Value Text)
name :: Domain -> Value Text
serverSideEncryptionConfiguration :: Domain -> ServerSideEncryptionConfigurationProperty
tags :: Domain -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
tags :: Maybe [Tag]
..}
    = Domain {serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
serverSideEncryptionConfiguration = PropertyType "ServerSideEncryptionConfiguration" Domain
ServerSideEncryptionConfigurationProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" Domain where
  type PropertyType "Tags" Domain = [Tag]
  set :: PropertyType "Tags" Domain -> Domain -> Domain
set PropertyType "Tags" Domain
newValue Domain {Maybe [Tag]
Maybe (Value Text)
()
Value Text
ServerSideEncryptionConfigurationProperty
haddock_workaround_ :: Domain -> ()
description :: Domain -> Maybe (Value Text)
name :: Domain -> Value Text
serverSideEncryptionConfiguration :: Domain -> ServerSideEncryptionConfigurationProperty
tags :: Domain -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
tags :: Maybe [Tag]
..}
    = Domain {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Domain
newValue, Maybe (Value Text)
()
Value Text
ServerSideEncryptionConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
serverSideEncryptionConfiguration :: ServerSideEncryptionConfigurationProperty
..}