module Stratosphere.SMSVOICE.SenderId (
SenderId(..), mkSenderId
) 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 SenderId
=
SenderId {SenderId -> ()
haddock_workaround_ :: (),
SenderId -> Maybe (Value Bool)
deletionProtectionEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
SenderId -> Value Text
isoCountryCode :: (Value Prelude.Text),
SenderId -> Value Text
senderId :: (Value Prelude.Text),
SenderId -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (SenderId -> SenderId -> Bool
(SenderId -> SenderId -> Bool)
-> (SenderId -> SenderId -> Bool) -> Eq SenderId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SenderId -> SenderId -> Bool
== :: SenderId -> SenderId -> Bool
$c/= :: SenderId -> SenderId -> Bool
/= :: SenderId -> SenderId -> Bool
Prelude.Eq, Int -> SenderId -> ShowS
[SenderId] -> ShowS
SenderId -> String
(Int -> SenderId -> ShowS)
-> (SenderId -> String) -> ([SenderId] -> ShowS) -> Show SenderId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SenderId -> ShowS
showsPrec :: Int -> SenderId -> ShowS
$cshow :: SenderId -> String
show :: SenderId -> String
$cshowList :: [SenderId] -> ShowS
showList :: [SenderId] -> ShowS
Prelude.Show)
mkSenderId :: Value Prelude.Text -> Value Prelude.Text -> SenderId
mkSenderId :: Value Text -> Value Text -> SenderId
mkSenderId Value Text
isoCountryCode Value Text
senderId
= SenderId
{haddock_workaround_ :: ()
haddock_workaround_ = (), isoCountryCode :: Value Text
isoCountryCode = Value Text
isoCountryCode,
senderId :: Value Text
senderId = Value Text
senderId, deletionProtectionEnabled :: Maybe (Value Bool)
deletionProtectionEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SenderId where
toResourceProperties :: SenderId -> ResourceProperties
toResourceProperties SenderId {Maybe [Tag]
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SenderId -> ()
deletionProtectionEnabled :: SenderId -> Maybe (Value Bool)
isoCountryCode :: SenderId -> Value Text
senderId :: SenderId -> Value Text
tags :: SenderId -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
isoCountryCode :: Value Text
senderId :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SMSVOICE::SenderId", 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
"IsoCountryCode" 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
isoCountryCode,
Key
"SenderId" 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
senderId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeletionProtectionEnabled"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
deletionProtectionEnabled,
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 SenderId where
toJSON :: SenderId -> Value
toJSON SenderId {Maybe [Tag]
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SenderId -> ()
deletionProtectionEnabled :: SenderId -> Maybe (Value Bool)
isoCountryCode :: SenderId -> Value Text
senderId :: SenderId -> Value Text
tags :: SenderId -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
isoCountryCode :: Value Text
senderId :: Value Text
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
"IsoCountryCode" 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
isoCountryCode,
Key
"SenderId" 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
senderId]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeletionProtectionEnabled"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
deletionProtectionEnabled,
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 "DeletionProtectionEnabled" SenderId where
type PropertyType "DeletionProtectionEnabled" SenderId = Value Prelude.Bool
set :: PropertyType "DeletionProtectionEnabled" SenderId
-> SenderId -> SenderId
set PropertyType "DeletionProtectionEnabled" SenderId
newValue SenderId {Maybe [Tag]
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SenderId -> ()
deletionProtectionEnabled :: SenderId -> Maybe (Value Bool)
isoCountryCode :: SenderId -> Value Text
senderId :: SenderId -> Value Text
tags :: SenderId -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
isoCountryCode :: Value Text
senderId :: Value Text
tags :: Maybe [Tag]
..}
= SenderId {deletionProtectionEnabled :: Maybe (Value Bool)
deletionProtectionEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeletionProtectionEnabled" SenderId
Value Bool
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
isoCountryCode :: Value Text
senderId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
isoCountryCode :: Value Text
senderId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "IsoCountryCode" SenderId where
type PropertyType "IsoCountryCode" SenderId = Value Prelude.Text
set :: PropertyType "IsoCountryCode" SenderId -> SenderId -> SenderId
set PropertyType "IsoCountryCode" SenderId
newValue SenderId {Maybe [Tag]
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SenderId -> ()
deletionProtectionEnabled :: SenderId -> Maybe (Value Bool)
isoCountryCode :: SenderId -> Value Text
senderId :: SenderId -> Value Text
tags :: SenderId -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
isoCountryCode :: Value Text
senderId :: Value Text
tags :: Maybe [Tag]
..}
= SenderId {isoCountryCode :: Value Text
isoCountryCode = PropertyType "IsoCountryCode" SenderId
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
senderId :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
senderId :: Value Text
tags :: Maybe [Tag]
..}
instance Property "SenderId" SenderId where
type PropertyType "SenderId" SenderId = Value Prelude.Text
set :: PropertyType "SenderId" SenderId -> SenderId -> SenderId
set PropertyType "SenderId" SenderId
newValue SenderId {Maybe [Tag]
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SenderId -> ()
deletionProtectionEnabled :: SenderId -> Maybe (Value Bool)
isoCountryCode :: SenderId -> Value Text
senderId :: SenderId -> Value Text
tags :: SenderId -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
isoCountryCode :: Value Text
senderId :: Value Text
tags :: Maybe [Tag]
..} = SenderId {senderId :: Value Text
senderId = PropertyType "SenderId" SenderId
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
isoCountryCode :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
isoCountryCode :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" SenderId where
type PropertyType "Tags" SenderId = [Tag]
set :: PropertyType "Tags" SenderId -> SenderId -> SenderId
set PropertyType "Tags" SenderId
newValue SenderId {Maybe [Tag]
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SenderId -> ()
deletionProtectionEnabled :: SenderId -> Maybe (Value Bool)
isoCountryCode :: SenderId -> Value Text
senderId :: SenderId -> Value Text
tags :: SenderId -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
isoCountryCode :: Value Text
senderId :: Value Text
tags :: Maybe [Tag]
..}
= SenderId {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" SenderId
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
isoCountryCode :: Value Text
senderId :: Value Text
haddock_workaround_ :: ()
deletionProtectionEnabled :: Maybe (Value Bool)
isoCountryCode :: Value Text
senderId :: Value Text
..}