module Stratosphere.ConnectCampaignsV2.Campaign.TimeoutConfigProperty (
TimeoutConfigProperty(..), mkTimeoutConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TimeoutConfigProperty
=
TimeoutConfigProperty {TimeoutConfigProperty -> ()
haddock_workaround_ :: (),
TimeoutConfigProperty -> Maybe (Value Integer)
durationInSeconds :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (TimeoutConfigProperty -> TimeoutConfigProperty -> Bool
(TimeoutConfigProperty -> TimeoutConfigProperty -> Bool)
-> (TimeoutConfigProperty -> TimeoutConfigProperty -> Bool)
-> Eq TimeoutConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TimeoutConfigProperty -> TimeoutConfigProperty -> Bool
== :: TimeoutConfigProperty -> TimeoutConfigProperty -> Bool
$c/= :: TimeoutConfigProperty -> TimeoutConfigProperty -> Bool
/= :: TimeoutConfigProperty -> TimeoutConfigProperty -> Bool
Prelude.Eq, Int -> TimeoutConfigProperty -> ShowS
[TimeoutConfigProperty] -> ShowS
TimeoutConfigProperty -> String
(Int -> TimeoutConfigProperty -> ShowS)
-> (TimeoutConfigProperty -> String)
-> ([TimeoutConfigProperty] -> ShowS)
-> Show TimeoutConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TimeoutConfigProperty -> ShowS
showsPrec :: Int -> TimeoutConfigProperty -> ShowS
$cshow :: TimeoutConfigProperty -> String
show :: TimeoutConfigProperty -> String
$cshowList :: [TimeoutConfigProperty] -> ShowS
showList :: [TimeoutConfigProperty] -> ShowS
Prelude.Show)
mkTimeoutConfigProperty :: TimeoutConfigProperty
mkTimeoutConfigProperty :: TimeoutConfigProperty
mkTimeoutConfigProperty
= TimeoutConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), durationInSeconds :: Maybe (Value Integer)
durationInSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TimeoutConfigProperty where
toResourceProperties :: TimeoutConfigProperty -> ResourceProperties
toResourceProperties TimeoutConfigProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TimeoutConfigProperty -> ()
durationInSeconds :: TimeoutConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
durationInSeconds :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ConnectCampaignsV2::Campaign.TimeoutConfig",
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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DurationInSeconds" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
durationInSeconds])}
instance JSON.ToJSON TimeoutConfigProperty where
toJSON :: TimeoutConfigProperty -> Value
toJSON TimeoutConfigProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TimeoutConfigProperty -> ()
durationInSeconds :: TimeoutConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
durationInSeconds :: Maybe (Value Integer)
..}
= [(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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DurationInSeconds" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
durationInSeconds]))
instance Property "DurationInSeconds" TimeoutConfigProperty where
type PropertyType "DurationInSeconds" TimeoutConfigProperty = Value Prelude.Integer
set :: PropertyType "DurationInSeconds" TimeoutConfigProperty
-> TimeoutConfigProperty -> TimeoutConfigProperty
set PropertyType "DurationInSeconds" TimeoutConfigProperty
newValue TimeoutConfigProperty {Maybe (Value Integer)
()
haddock_workaround_ :: TimeoutConfigProperty -> ()
durationInSeconds :: TimeoutConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
durationInSeconds :: Maybe (Value Integer)
..}
= TimeoutConfigProperty
{durationInSeconds :: Maybe (Value Integer)
durationInSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DurationInSeconds" TimeoutConfigProperty
Value Integer
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}