module Stratosphere.KinesisFirehose.DeliveryStream.RedshiftRetryOptionsProperty (
        RedshiftRetryOptionsProperty(..), mkRedshiftRetryOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RedshiftRetryOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-redshiftretryoptions.html>
    RedshiftRetryOptionsProperty {RedshiftRetryOptionsProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-redshiftretryoptions.html#cfn-kinesisfirehose-deliverystream-redshiftretryoptions-durationinseconds>
                                  RedshiftRetryOptionsProperty -> Maybe (Value Integer)
durationInSeconds :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (RedshiftRetryOptionsProperty
-> RedshiftRetryOptionsProperty -> Bool
(RedshiftRetryOptionsProperty
 -> RedshiftRetryOptionsProperty -> Bool)
-> (RedshiftRetryOptionsProperty
    -> RedshiftRetryOptionsProperty -> Bool)
-> Eq RedshiftRetryOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RedshiftRetryOptionsProperty
-> RedshiftRetryOptionsProperty -> Bool
== :: RedshiftRetryOptionsProperty
-> RedshiftRetryOptionsProperty -> Bool
$c/= :: RedshiftRetryOptionsProperty
-> RedshiftRetryOptionsProperty -> Bool
/= :: RedshiftRetryOptionsProperty
-> RedshiftRetryOptionsProperty -> Bool
Prelude.Eq, Int -> RedshiftRetryOptionsProperty -> ShowS
[RedshiftRetryOptionsProperty] -> ShowS
RedshiftRetryOptionsProperty -> String
(Int -> RedshiftRetryOptionsProperty -> ShowS)
-> (RedshiftRetryOptionsProperty -> String)
-> ([RedshiftRetryOptionsProperty] -> ShowS)
-> Show RedshiftRetryOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RedshiftRetryOptionsProperty -> ShowS
showsPrec :: Int -> RedshiftRetryOptionsProperty -> ShowS
$cshow :: RedshiftRetryOptionsProperty -> String
show :: RedshiftRetryOptionsProperty -> String
$cshowList :: [RedshiftRetryOptionsProperty] -> ShowS
showList :: [RedshiftRetryOptionsProperty] -> ShowS
Prelude.Show)
mkRedshiftRetryOptionsProperty :: RedshiftRetryOptionsProperty
mkRedshiftRetryOptionsProperty :: RedshiftRetryOptionsProperty
mkRedshiftRetryOptionsProperty
  = RedshiftRetryOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), durationInSeconds :: Maybe (Value Integer)
durationInSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RedshiftRetryOptionsProperty where
  toResourceProperties :: RedshiftRetryOptionsProperty -> ResourceProperties
toResourceProperties RedshiftRetryOptionsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: RedshiftRetryOptionsProperty -> ()
durationInSeconds :: RedshiftRetryOptionsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
durationInSeconds :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::KinesisFirehose::DeliveryStream.RedshiftRetryOptions",
         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 RedshiftRetryOptionsProperty where
  toJSON :: RedshiftRetryOptionsProperty -> Value
toJSON RedshiftRetryOptionsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: RedshiftRetryOptionsProperty -> ()
durationInSeconds :: RedshiftRetryOptionsProperty -> 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" RedshiftRetryOptionsProperty where
  type PropertyType "DurationInSeconds" RedshiftRetryOptionsProperty = Value Prelude.Integer
  set :: PropertyType "DurationInSeconds" RedshiftRetryOptionsProperty
-> RedshiftRetryOptionsProperty -> RedshiftRetryOptionsProperty
set PropertyType "DurationInSeconds" RedshiftRetryOptionsProperty
newValue RedshiftRetryOptionsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: RedshiftRetryOptionsProperty -> ()
durationInSeconds :: RedshiftRetryOptionsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
durationInSeconds :: Maybe (Value Integer)
..}
    = RedshiftRetryOptionsProperty
        {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" RedshiftRetryOptionsProperty
Value Integer
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}