module Stratosphere.SMSVOICE.ProtectConfiguration.CountryRuleSetProperty (
module Exports, CountryRuleSetProperty(..),
mkCountryRuleSetProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SMSVOICE.ProtectConfiguration.CountryRuleProperty as Exports
import Stratosphere.ResourceProperties
data CountryRuleSetProperty
=
CountryRuleSetProperty {CountryRuleSetProperty -> ()
haddock_workaround_ :: (),
CountryRuleSetProperty -> Maybe [CountryRuleProperty]
mMS :: (Prelude.Maybe [CountryRuleProperty]),
CountryRuleSetProperty -> Maybe [CountryRuleProperty]
sMS :: (Prelude.Maybe [CountryRuleProperty]),
CountryRuleSetProperty -> Maybe [CountryRuleProperty]
vOICE :: (Prelude.Maybe [CountryRuleProperty])}
deriving stock (CountryRuleSetProperty -> CountryRuleSetProperty -> Bool
(CountryRuleSetProperty -> CountryRuleSetProperty -> Bool)
-> (CountryRuleSetProperty -> CountryRuleSetProperty -> Bool)
-> Eq CountryRuleSetProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CountryRuleSetProperty -> CountryRuleSetProperty -> Bool
== :: CountryRuleSetProperty -> CountryRuleSetProperty -> Bool
$c/= :: CountryRuleSetProperty -> CountryRuleSetProperty -> Bool
/= :: CountryRuleSetProperty -> CountryRuleSetProperty -> Bool
Prelude.Eq, Int -> CountryRuleSetProperty -> ShowS
[CountryRuleSetProperty] -> ShowS
CountryRuleSetProperty -> String
(Int -> CountryRuleSetProperty -> ShowS)
-> (CountryRuleSetProperty -> String)
-> ([CountryRuleSetProperty] -> ShowS)
-> Show CountryRuleSetProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CountryRuleSetProperty -> ShowS
showsPrec :: Int -> CountryRuleSetProperty -> ShowS
$cshow :: CountryRuleSetProperty -> String
show :: CountryRuleSetProperty -> String
$cshowList :: [CountryRuleSetProperty] -> ShowS
showList :: [CountryRuleSetProperty] -> ShowS
Prelude.Show)
mkCountryRuleSetProperty :: CountryRuleSetProperty
mkCountryRuleSetProperty :: CountryRuleSetProperty
mkCountryRuleSetProperty
= CountryRuleSetProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), mMS :: Maybe [CountryRuleProperty]
mMS = Maybe [CountryRuleProperty]
forall a. Maybe a
Prelude.Nothing,
sMS :: Maybe [CountryRuleProperty]
sMS = Maybe [CountryRuleProperty]
forall a. Maybe a
Prelude.Nothing, vOICE :: Maybe [CountryRuleProperty]
vOICE = Maybe [CountryRuleProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CountryRuleSetProperty where
toResourceProperties :: CountryRuleSetProperty -> ResourceProperties
toResourceProperties CountryRuleSetProperty {Maybe [CountryRuleProperty]
()
haddock_workaround_ :: CountryRuleSetProperty -> ()
mMS :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
sMS :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
vOICE :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
haddock_workaround_ :: ()
mMS :: Maybe [CountryRuleProperty]
sMS :: Maybe [CountryRuleProperty]
vOICE :: Maybe [CountryRuleProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SMSVOICE::ProtectConfiguration.CountryRuleSet",
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 -> [CountryRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MMS" ([CountryRuleProperty] -> (Key, Value))
-> Maybe [CountryRuleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CountryRuleProperty]
mMS, Key -> [CountryRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SMS" ([CountryRuleProperty] -> (Key, Value))
-> Maybe [CountryRuleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CountryRuleProperty]
sMS,
Key -> [CountryRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"VOICE" ([CountryRuleProperty] -> (Key, Value))
-> Maybe [CountryRuleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CountryRuleProperty]
vOICE])}
instance JSON.ToJSON CountryRuleSetProperty where
toJSON :: CountryRuleSetProperty -> Value
toJSON CountryRuleSetProperty {Maybe [CountryRuleProperty]
()
haddock_workaround_ :: CountryRuleSetProperty -> ()
mMS :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
sMS :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
vOICE :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
haddock_workaround_ :: ()
mMS :: Maybe [CountryRuleProperty]
sMS :: Maybe [CountryRuleProperty]
vOICE :: Maybe [CountryRuleProperty]
..}
= [(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 -> [CountryRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MMS" ([CountryRuleProperty] -> (Key, Value))
-> Maybe [CountryRuleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CountryRuleProperty]
mMS, Key -> [CountryRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SMS" ([CountryRuleProperty] -> (Key, Value))
-> Maybe [CountryRuleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CountryRuleProperty]
sMS,
Key -> [CountryRuleProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"VOICE" ([CountryRuleProperty] -> (Key, Value))
-> Maybe [CountryRuleProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CountryRuleProperty]
vOICE]))
instance Property "MMS" CountryRuleSetProperty where
type PropertyType "MMS" CountryRuleSetProperty = [CountryRuleProperty]
set :: PropertyType "MMS" CountryRuleSetProperty
-> CountryRuleSetProperty -> CountryRuleSetProperty
set PropertyType "MMS" CountryRuleSetProperty
newValue CountryRuleSetProperty {Maybe [CountryRuleProperty]
()
haddock_workaround_ :: CountryRuleSetProperty -> ()
mMS :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
sMS :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
vOICE :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
haddock_workaround_ :: ()
mMS :: Maybe [CountryRuleProperty]
sMS :: Maybe [CountryRuleProperty]
vOICE :: Maybe [CountryRuleProperty]
..}
= CountryRuleSetProperty {mMS :: Maybe [CountryRuleProperty]
mMS = [CountryRuleProperty] -> Maybe [CountryRuleProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [CountryRuleProperty]
PropertyType "MMS" CountryRuleSetProperty
newValue, Maybe [CountryRuleProperty]
()
haddock_workaround_ :: ()
sMS :: Maybe [CountryRuleProperty]
vOICE :: Maybe [CountryRuleProperty]
haddock_workaround_ :: ()
sMS :: Maybe [CountryRuleProperty]
vOICE :: Maybe [CountryRuleProperty]
..}
instance Property "SMS" CountryRuleSetProperty where
type PropertyType "SMS" CountryRuleSetProperty = [CountryRuleProperty]
set :: PropertyType "SMS" CountryRuleSetProperty
-> CountryRuleSetProperty -> CountryRuleSetProperty
set PropertyType "SMS" CountryRuleSetProperty
newValue CountryRuleSetProperty {Maybe [CountryRuleProperty]
()
haddock_workaround_ :: CountryRuleSetProperty -> ()
mMS :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
sMS :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
vOICE :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
haddock_workaround_ :: ()
mMS :: Maybe [CountryRuleProperty]
sMS :: Maybe [CountryRuleProperty]
vOICE :: Maybe [CountryRuleProperty]
..}
= CountryRuleSetProperty {sMS :: Maybe [CountryRuleProperty]
sMS = [CountryRuleProperty] -> Maybe [CountryRuleProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [CountryRuleProperty]
PropertyType "SMS" CountryRuleSetProperty
newValue, Maybe [CountryRuleProperty]
()
haddock_workaround_ :: ()
mMS :: Maybe [CountryRuleProperty]
vOICE :: Maybe [CountryRuleProperty]
haddock_workaround_ :: ()
mMS :: Maybe [CountryRuleProperty]
vOICE :: Maybe [CountryRuleProperty]
..}
instance Property "VOICE" CountryRuleSetProperty where
type PropertyType "VOICE" CountryRuleSetProperty = [CountryRuleProperty]
set :: PropertyType "VOICE" CountryRuleSetProperty
-> CountryRuleSetProperty -> CountryRuleSetProperty
set PropertyType "VOICE" CountryRuleSetProperty
newValue CountryRuleSetProperty {Maybe [CountryRuleProperty]
()
haddock_workaround_ :: CountryRuleSetProperty -> ()
mMS :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
sMS :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
vOICE :: CountryRuleSetProperty -> Maybe [CountryRuleProperty]
haddock_workaround_ :: ()
mMS :: Maybe [CountryRuleProperty]
sMS :: Maybe [CountryRuleProperty]
vOICE :: Maybe [CountryRuleProperty]
..}
= CountryRuleSetProperty {vOICE :: Maybe [CountryRuleProperty]
vOICE = [CountryRuleProperty] -> Maybe [CountryRuleProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [CountryRuleProperty]
PropertyType "VOICE" CountryRuleSetProperty
newValue, Maybe [CountryRuleProperty]
()
haddock_workaround_ :: ()
mMS :: Maybe [CountryRuleProperty]
sMS :: Maybe [CountryRuleProperty]
haddock_workaround_ :: ()
mMS :: Maybe [CountryRuleProperty]
sMS :: Maybe [CountryRuleProperty]
..}