module Stratosphere.SMSVOICE.OptOutList (
OptOutList(..), mkOptOutList
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data OptOutList
=
OptOutList {OptOutList -> ()
haddock_workaround_ :: (),
OptOutList -> Maybe (Value Text)
optOutListName :: (Prelude.Maybe (Value Prelude.Text)),
OptOutList -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (OptOutList -> OptOutList -> Bool
(OptOutList -> OptOutList -> Bool)
-> (OptOutList -> OptOutList -> Bool) -> Eq OptOutList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OptOutList -> OptOutList -> Bool
== :: OptOutList -> OptOutList -> Bool
$c/= :: OptOutList -> OptOutList -> Bool
/= :: OptOutList -> OptOutList -> Bool
Prelude.Eq, Int -> OptOutList -> ShowS
[OptOutList] -> ShowS
OptOutList -> String
(Int -> OptOutList -> ShowS)
-> (OptOutList -> String)
-> ([OptOutList] -> ShowS)
-> Show OptOutList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OptOutList -> ShowS
showsPrec :: Int -> OptOutList -> ShowS
$cshow :: OptOutList -> String
show :: OptOutList -> String
$cshowList :: [OptOutList] -> ShowS
showList :: [OptOutList] -> ShowS
Prelude.Show)
mkOptOutList :: OptOutList
mkOptOutList :: OptOutList
mkOptOutList
= OptOutList
{haddock_workaround_ :: ()
haddock_workaround_ = (), optOutListName :: Maybe (Value Text)
optOutListName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OptOutList where
toResourceProperties :: OptOutList -> ResourceProperties
toResourceProperties OptOutList {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: OptOutList -> ()
optOutListName :: OptOutList -> Maybe (Value Text)
tags :: OptOutList -> Maybe [Tag]
haddock_workaround_ :: ()
optOutListName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SMSVOICE::OptOutList",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"OptOutListName" (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)
optOutListName,
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 OptOutList where
toJSON :: OptOutList -> Value
toJSON OptOutList {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: OptOutList -> ()
optOutListName :: OptOutList -> Maybe (Value Text)
tags :: OptOutList -> Maybe [Tag]
haddock_workaround_ :: ()
optOutListName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= [(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
"OptOutListName" (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)
optOutListName,
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 "OptOutListName" OptOutList where
type PropertyType "OptOutListName" OptOutList = Value Prelude.Text
set :: PropertyType "OptOutListName" OptOutList
-> OptOutList -> OptOutList
set PropertyType "OptOutListName" OptOutList
newValue OptOutList {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: OptOutList -> ()
optOutListName :: OptOutList -> Maybe (Value Text)
tags :: OptOutList -> Maybe [Tag]
haddock_workaround_ :: ()
optOutListName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= OptOutList {optOutListName :: Maybe (Value Text)
optOutListName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OptOutListName" OptOutList
Value Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" OptOutList where
type PropertyType "Tags" OptOutList = [Tag]
set :: PropertyType "Tags" OptOutList -> OptOutList -> OptOutList
set PropertyType "Tags" OptOutList
newValue OptOutList {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: OptOutList -> ()
optOutListName :: OptOutList -> Maybe (Value Text)
tags :: OptOutList -> Maybe [Tag]
haddock_workaround_ :: ()
optOutListName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= OptOutList {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" OptOutList
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
optOutListName :: Maybe (Value Text)
haddock_workaround_ :: ()
optOutListName :: Maybe (Value Text)
..}