module Stratosphere.SDB.Domain (
Domain(..), mkDomain
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Domain
=
Domain {Domain -> ()
haddock_workaround_ :: (),
Domain -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text))}
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 :: Domain
mkDomain :: Domain
mkDomain
= Domain {haddock_workaround_ :: ()
haddock_workaround_ = (), description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Domain where
toResourceProperties :: Domain -> ResourceProperties
toResourceProperties Domain {Maybe (Value Text)
()
haddock_workaround_ :: Domain -> ()
description :: Domain -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SDB::Domain", 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
"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])}
instance JSON.ToJSON Domain where
toJSON :: Domain -> Value
toJSON Domain {Maybe (Value Text)
()
haddock_workaround_ :: Domain -> ()
description :: Domain -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: 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
"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]))
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 (Value Text)
()
haddock_workaround_ :: Domain -> ()
description :: Domain -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
..}
= 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, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}