module Stratosphere.RedshiftServerless.Namespace.SnapshotCopyConfigurationProperty (
        SnapshotCopyConfigurationProperty(..),
        mkSnapshotCopyConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SnapshotCopyConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshiftserverless-namespace-snapshotcopyconfiguration.html>
    SnapshotCopyConfigurationProperty {SnapshotCopyConfigurationProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshiftserverless-namespace-snapshotcopyconfiguration.html#cfn-redshiftserverless-namespace-snapshotcopyconfiguration-destinationkmskeyid>
                                       SnapshotCopyConfigurationProperty -> Maybe (Value Text)
destinationKmsKeyId :: (Prelude.Maybe (Value Prelude.Text)),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshiftserverless-namespace-snapshotcopyconfiguration.html#cfn-redshiftserverless-namespace-snapshotcopyconfiguration-destinationregion>
                                       SnapshotCopyConfigurationProperty -> Value Text
destinationRegion :: (Value Prelude.Text),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshiftserverless-namespace-snapshotcopyconfiguration.html#cfn-redshiftserverless-namespace-snapshotcopyconfiguration-snapshotretentionperiod>
                                       SnapshotCopyConfigurationProperty -> Maybe (Value Integer)
snapshotRetentionPeriod :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty -> Bool
(SnapshotCopyConfigurationProperty
 -> SnapshotCopyConfigurationProperty -> Bool)
-> (SnapshotCopyConfigurationProperty
    -> SnapshotCopyConfigurationProperty -> Bool)
-> Eq SnapshotCopyConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty -> Bool
== :: SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty -> Bool
$c/= :: SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty -> Bool
/= :: SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty -> Bool
Prelude.Eq, Int -> SnapshotCopyConfigurationProperty -> ShowS
[SnapshotCopyConfigurationProperty] -> ShowS
SnapshotCopyConfigurationProperty -> String
(Int -> SnapshotCopyConfigurationProperty -> ShowS)
-> (SnapshotCopyConfigurationProperty -> String)
-> ([SnapshotCopyConfigurationProperty] -> ShowS)
-> Show SnapshotCopyConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SnapshotCopyConfigurationProperty -> ShowS
showsPrec :: Int -> SnapshotCopyConfigurationProperty -> ShowS
$cshow :: SnapshotCopyConfigurationProperty -> String
show :: SnapshotCopyConfigurationProperty -> String
$cshowList :: [SnapshotCopyConfigurationProperty] -> ShowS
showList :: [SnapshotCopyConfigurationProperty] -> ShowS
Prelude.Show)
mkSnapshotCopyConfigurationProperty ::
  Value Prelude.Text -> SnapshotCopyConfigurationProperty
mkSnapshotCopyConfigurationProperty :: Value Text -> SnapshotCopyConfigurationProperty
mkSnapshotCopyConfigurationProperty Value Text
destinationRegion
  = SnapshotCopyConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), destinationRegion :: Value Text
destinationRegion = Value Text
destinationRegion,
       destinationKmsKeyId :: Maybe (Value Text)
destinationKmsKeyId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       snapshotRetentionPeriod :: Maybe (Value Integer)
snapshotRetentionPeriod = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SnapshotCopyConfigurationProperty where
  toResourceProperties :: SnapshotCopyConfigurationProperty -> ResourceProperties
toResourceProperties SnapshotCopyConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SnapshotCopyConfigurationProperty -> ()
destinationKmsKeyId :: SnapshotCopyConfigurationProperty -> Maybe (Value Text)
destinationRegion :: SnapshotCopyConfigurationProperty -> Value Text
snapshotRetentionPeriod :: SnapshotCopyConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
destinationKmsKeyId :: Maybe (Value Text)
destinationRegion :: Value Text
snapshotRetentionPeriod :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::RedshiftServerless::Namespace.SnapshotCopyConfiguration",
         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
"DestinationRegion" 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
destinationRegion]
                           ([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
"DestinationKmsKeyId" (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)
destinationKmsKeyId,
                               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
"SnapshotRetentionPeriod"
                                 (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)
snapshotRetentionPeriod]))}
instance JSON.ToJSON SnapshotCopyConfigurationProperty where
  toJSON :: SnapshotCopyConfigurationProperty -> Value
toJSON SnapshotCopyConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SnapshotCopyConfigurationProperty -> ()
destinationKmsKeyId :: SnapshotCopyConfigurationProperty -> Maybe (Value Text)
destinationRegion :: SnapshotCopyConfigurationProperty -> Value Text
snapshotRetentionPeriod :: SnapshotCopyConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
destinationKmsKeyId :: Maybe (Value Text)
destinationRegion :: Value Text
snapshotRetentionPeriod :: Maybe (Value Integer)
..}
    = [(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
"DestinationRegion" 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
destinationRegion]
              ([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
"DestinationKmsKeyId" (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)
destinationKmsKeyId,
                  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
"SnapshotRetentionPeriod"
                    (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)
snapshotRetentionPeriod])))
instance Property "DestinationKmsKeyId" SnapshotCopyConfigurationProperty where
  type PropertyType "DestinationKmsKeyId" SnapshotCopyConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "DestinationKmsKeyId" SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty
set PropertyType
  "DestinationKmsKeyId" SnapshotCopyConfigurationProperty
newValue SnapshotCopyConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SnapshotCopyConfigurationProperty -> ()
destinationKmsKeyId :: SnapshotCopyConfigurationProperty -> Maybe (Value Text)
destinationRegion :: SnapshotCopyConfigurationProperty -> Value Text
snapshotRetentionPeriod :: SnapshotCopyConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
destinationKmsKeyId :: Maybe (Value Text)
destinationRegion :: Value Text
snapshotRetentionPeriod :: Maybe (Value Integer)
..}
    = SnapshotCopyConfigurationProperty
        {destinationKmsKeyId :: Maybe (Value Text)
destinationKmsKeyId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "DestinationKmsKeyId" SnapshotCopyConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
destinationRegion :: Value Text
snapshotRetentionPeriod :: Maybe (Value Integer)
haddock_workaround_ :: ()
destinationRegion :: Value Text
snapshotRetentionPeriod :: Maybe (Value Integer)
..}
instance Property "DestinationRegion" SnapshotCopyConfigurationProperty where
  type PropertyType "DestinationRegion" SnapshotCopyConfigurationProperty = Value Prelude.Text
  set :: PropertyType "DestinationRegion" SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty
set PropertyType "DestinationRegion" SnapshotCopyConfigurationProperty
newValue SnapshotCopyConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SnapshotCopyConfigurationProperty -> ()
destinationKmsKeyId :: SnapshotCopyConfigurationProperty -> Maybe (Value Text)
destinationRegion :: SnapshotCopyConfigurationProperty -> Value Text
snapshotRetentionPeriod :: SnapshotCopyConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
destinationKmsKeyId :: Maybe (Value Text)
destinationRegion :: Value Text
snapshotRetentionPeriod :: Maybe (Value Integer)
..}
    = SnapshotCopyConfigurationProperty
        {destinationRegion :: Value Text
destinationRegion = PropertyType "DestinationRegion" SnapshotCopyConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
destinationKmsKeyId :: Maybe (Value Text)
snapshotRetentionPeriod :: Maybe (Value Integer)
haddock_workaround_ :: ()
destinationKmsKeyId :: Maybe (Value Text)
snapshotRetentionPeriod :: Maybe (Value Integer)
..}
instance Property "SnapshotRetentionPeriod" SnapshotCopyConfigurationProperty where
  type PropertyType "SnapshotRetentionPeriod" SnapshotCopyConfigurationProperty = Value Prelude.Integer
  set :: PropertyType
  "SnapshotRetentionPeriod" SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty
-> SnapshotCopyConfigurationProperty
set PropertyType
  "SnapshotRetentionPeriod" SnapshotCopyConfigurationProperty
newValue SnapshotCopyConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SnapshotCopyConfigurationProperty -> ()
destinationKmsKeyId :: SnapshotCopyConfigurationProperty -> Maybe (Value Text)
destinationRegion :: SnapshotCopyConfigurationProperty -> Value Text
snapshotRetentionPeriod :: SnapshotCopyConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
destinationKmsKeyId :: Maybe (Value Text)
destinationRegion :: Value Text
snapshotRetentionPeriod :: Maybe (Value Integer)
..}
    = SnapshotCopyConfigurationProperty
        {snapshotRetentionPeriod :: Maybe (Value Integer)
snapshotRetentionPeriod = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "SnapshotRetentionPeriod" SnapshotCopyConfigurationProperty
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
destinationKmsKeyId :: Maybe (Value Text)
destinationRegion :: Value Text
haddock_workaround_ :: ()
destinationKmsKeyId :: Maybe (Value Text)
destinationRegion :: Value Text
..}