module Stratosphere.SMSVOICE.PhoneNumber.TwoWayProperty (
TwoWayProperty(..), mkTwoWayProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TwoWayProperty
=
TwoWayProperty {TwoWayProperty -> ()
haddock_workaround_ :: (),
TwoWayProperty -> Maybe (Value Text)
channelArn :: (Prelude.Maybe (Value Prelude.Text)),
TwoWayProperty -> Maybe (Value Text)
channelRole :: (Prelude.Maybe (Value Prelude.Text)),
TwoWayProperty -> Value Bool
enabled :: (Value Prelude.Bool)}
deriving stock (TwoWayProperty -> TwoWayProperty -> Bool
(TwoWayProperty -> TwoWayProperty -> Bool)
-> (TwoWayProperty -> TwoWayProperty -> Bool) -> Eq TwoWayProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TwoWayProperty -> TwoWayProperty -> Bool
== :: TwoWayProperty -> TwoWayProperty -> Bool
$c/= :: TwoWayProperty -> TwoWayProperty -> Bool
/= :: TwoWayProperty -> TwoWayProperty -> Bool
Prelude.Eq, Int -> TwoWayProperty -> ShowS
[TwoWayProperty] -> ShowS
TwoWayProperty -> String
(Int -> TwoWayProperty -> ShowS)
-> (TwoWayProperty -> String)
-> ([TwoWayProperty] -> ShowS)
-> Show TwoWayProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TwoWayProperty -> ShowS
showsPrec :: Int -> TwoWayProperty -> ShowS
$cshow :: TwoWayProperty -> String
show :: TwoWayProperty -> String
$cshowList :: [TwoWayProperty] -> ShowS
showList :: [TwoWayProperty] -> ShowS
Prelude.Show)
mkTwoWayProperty :: Value Prelude.Bool -> TwoWayProperty
mkTwoWayProperty :: Value Bool -> TwoWayProperty
mkTwoWayProperty Value Bool
enabled
= TwoWayProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Value Bool
enabled = Value Bool
enabled,
channelArn :: Maybe (Value Text)
channelArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, channelRole :: Maybe (Value Text)
channelRole = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TwoWayProperty where
toResourceProperties :: TwoWayProperty -> ResourceProperties
toResourceProperties TwoWayProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: TwoWayProperty -> ()
channelArn :: TwoWayProperty -> Maybe (Value Text)
channelRole :: TwoWayProperty -> Maybe (Value Text)
enabled :: TwoWayProperty -> Value Bool
haddock_workaround_ :: ()
channelArn :: Maybe (Value Text)
channelRole :: Maybe (Value Text)
enabled :: Value Bool
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SMSVOICE::PhoneNumber.TwoWay",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"Enabled" 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..= Value Bool
enabled]
([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
"ChannelArn" (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)
channelArn,
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
"ChannelRole" (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)
channelRole]))}
instance JSON.ToJSON TwoWayProperty where
toJSON :: TwoWayProperty -> Value
toJSON TwoWayProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: TwoWayProperty -> ()
channelArn :: TwoWayProperty -> Maybe (Value Text)
channelRole :: TwoWayProperty -> Maybe (Value Text)
enabled :: TwoWayProperty -> Value Bool
haddock_workaround_ :: ()
channelArn :: Maybe (Value Text)
channelRole :: Maybe (Value Text)
enabled :: Value Bool
..}
= [(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
"Enabled" 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..= Value Bool
enabled]
([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
"ChannelArn" (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)
channelArn,
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
"ChannelRole" (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)
channelRole])))
instance Property "ChannelArn" TwoWayProperty where
type PropertyType "ChannelArn" TwoWayProperty = Value Prelude.Text
set :: PropertyType "ChannelArn" TwoWayProperty
-> TwoWayProperty -> TwoWayProperty
set PropertyType "ChannelArn" TwoWayProperty
newValue TwoWayProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: TwoWayProperty -> ()
channelArn :: TwoWayProperty -> Maybe (Value Text)
channelRole :: TwoWayProperty -> Maybe (Value Text)
enabled :: TwoWayProperty -> Value Bool
haddock_workaround_ :: ()
channelArn :: Maybe (Value Text)
channelRole :: Maybe (Value Text)
enabled :: Value Bool
..}
= TwoWayProperty {channelArn :: Maybe (Value Text)
channelArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ChannelArn" TwoWayProperty
Value Text
newValue, Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: ()
channelRole :: Maybe (Value Text)
enabled :: Value Bool
haddock_workaround_ :: ()
channelRole :: Maybe (Value Text)
enabled :: Value Bool
..}
instance Property "ChannelRole" TwoWayProperty where
type PropertyType "ChannelRole" TwoWayProperty = Value Prelude.Text
set :: PropertyType "ChannelRole" TwoWayProperty
-> TwoWayProperty -> TwoWayProperty
set PropertyType "ChannelRole" TwoWayProperty
newValue TwoWayProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: TwoWayProperty -> ()
channelArn :: TwoWayProperty -> Maybe (Value Text)
channelRole :: TwoWayProperty -> Maybe (Value Text)
enabled :: TwoWayProperty -> Value Bool
haddock_workaround_ :: ()
channelArn :: Maybe (Value Text)
channelRole :: Maybe (Value Text)
enabled :: Value Bool
..}
= TwoWayProperty {channelRole :: Maybe (Value Text)
channelRole = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ChannelRole" TwoWayProperty
Value Text
newValue, Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: ()
channelArn :: Maybe (Value Text)
enabled :: Value Bool
haddock_workaround_ :: ()
channelArn :: Maybe (Value Text)
enabled :: Value Bool
..}
instance Property "Enabled" TwoWayProperty where
type PropertyType "Enabled" TwoWayProperty = Value Prelude.Bool
set :: PropertyType "Enabled" TwoWayProperty
-> TwoWayProperty -> TwoWayProperty
set PropertyType "Enabled" TwoWayProperty
newValue TwoWayProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: TwoWayProperty -> ()
channelArn :: TwoWayProperty -> Maybe (Value Text)
channelRole :: TwoWayProperty -> Maybe (Value Text)
enabled :: TwoWayProperty -> Value Bool
haddock_workaround_ :: ()
channelArn :: Maybe (Value Text)
channelRole :: Maybe (Value Text)
enabled :: Value Bool
..}
= TwoWayProperty {enabled :: Value Bool
enabled = PropertyType "Enabled" TwoWayProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
channelArn :: Maybe (Value Text)
channelRole :: Maybe (Value Text)
haddock_workaround_ :: ()
channelArn :: Maybe (Value Text)
channelRole :: Maybe (Value Text)
..}