module Stratosphere.Glue.TableOptimizer.RetentionConfigurationProperty (
        module Exports, RetentionConfigurationProperty(..),
        mkRetentionConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Glue.TableOptimizer.IcebergRetentionConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data RetentionConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-tableoptimizer-tableoptimizerconfiguration-retentionconfiguration.html>
    RetentionConfigurationProperty {RetentionConfigurationProperty -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-tableoptimizer-tableoptimizerconfiguration-retentionconfiguration.html#cfn-glue-tableoptimizer-tableoptimizerconfiguration-retentionconfiguration-icebergconfiguration>
                                    RetentionConfigurationProperty
-> Maybe IcebergRetentionConfigurationProperty
icebergConfiguration :: (Prelude.Maybe IcebergRetentionConfigurationProperty)}
  deriving stock (RetentionConfigurationProperty
-> RetentionConfigurationProperty -> Bool
(RetentionConfigurationProperty
 -> RetentionConfigurationProperty -> Bool)
-> (RetentionConfigurationProperty
    -> RetentionConfigurationProperty -> Bool)
-> Eq RetentionConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RetentionConfigurationProperty
-> RetentionConfigurationProperty -> Bool
== :: RetentionConfigurationProperty
-> RetentionConfigurationProperty -> Bool
$c/= :: RetentionConfigurationProperty
-> RetentionConfigurationProperty -> Bool
/= :: RetentionConfigurationProperty
-> RetentionConfigurationProperty -> Bool
Prelude.Eq, Int -> RetentionConfigurationProperty -> ShowS
[RetentionConfigurationProperty] -> ShowS
RetentionConfigurationProperty -> String
(Int -> RetentionConfigurationProperty -> ShowS)
-> (RetentionConfigurationProperty -> String)
-> ([RetentionConfigurationProperty] -> ShowS)
-> Show RetentionConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RetentionConfigurationProperty -> ShowS
showsPrec :: Int -> RetentionConfigurationProperty -> ShowS
$cshow :: RetentionConfigurationProperty -> String
show :: RetentionConfigurationProperty -> String
$cshowList :: [RetentionConfigurationProperty] -> ShowS
showList :: [RetentionConfigurationProperty] -> ShowS
Prelude.Show)
mkRetentionConfigurationProperty :: RetentionConfigurationProperty
mkRetentionConfigurationProperty :: RetentionConfigurationProperty
mkRetentionConfigurationProperty
  = RetentionConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), icebergConfiguration :: Maybe IcebergRetentionConfigurationProperty
icebergConfiguration = Maybe IcebergRetentionConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RetentionConfigurationProperty where
  toResourceProperties :: RetentionConfigurationProperty -> ResourceProperties
toResourceProperties RetentionConfigurationProperty {Maybe IcebergRetentionConfigurationProperty
()
haddock_workaround_ :: RetentionConfigurationProperty -> ()
icebergConfiguration :: RetentionConfigurationProperty
-> Maybe IcebergRetentionConfigurationProperty
haddock_workaround_ :: ()
icebergConfiguration :: Maybe IcebergRetentionConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Glue::TableOptimizer.RetentionConfiguration",
         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 -> IcebergRetentionConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IcebergConfiguration"
                              (IcebergRetentionConfigurationProperty -> (Key, Value))
-> Maybe IcebergRetentionConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IcebergRetentionConfigurationProperty
icebergConfiguration])}
instance JSON.ToJSON RetentionConfigurationProperty where
  toJSON :: RetentionConfigurationProperty -> Value
toJSON RetentionConfigurationProperty {Maybe IcebergRetentionConfigurationProperty
()
haddock_workaround_ :: RetentionConfigurationProperty -> ()
icebergConfiguration :: RetentionConfigurationProperty
-> Maybe IcebergRetentionConfigurationProperty
haddock_workaround_ :: ()
icebergConfiguration :: Maybe IcebergRetentionConfigurationProperty
..}
    = [(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 -> IcebergRetentionConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IcebergConfiguration"
                 (IcebergRetentionConfigurationProperty -> (Key, Value))
-> Maybe IcebergRetentionConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IcebergRetentionConfigurationProperty
icebergConfiguration]))
instance Property "IcebergConfiguration" RetentionConfigurationProperty where
  type PropertyType "IcebergConfiguration" RetentionConfigurationProperty = IcebergRetentionConfigurationProperty
  set :: PropertyType "IcebergConfiguration" RetentionConfigurationProperty
-> RetentionConfigurationProperty -> RetentionConfigurationProperty
set PropertyType "IcebergConfiguration" RetentionConfigurationProperty
newValue RetentionConfigurationProperty {Maybe IcebergRetentionConfigurationProperty
()
haddock_workaround_ :: RetentionConfigurationProperty -> ()
icebergConfiguration :: RetentionConfigurationProperty
-> Maybe IcebergRetentionConfigurationProperty
haddock_workaround_ :: ()
icebergConfiguration :: Maybe IcebergRetentionConfigurationProperty
..}
    = RetentionConfigurationProperty
        {icebergConfiguration :: Maybe IcebergRetentionConfigurationProperty
icebergConfiguration = IcebergRetentionConfigurationProperty
-> Maybe IcebergRetentionConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IcebergConfiguration" RetentionConfigurationProperty
IcebergRetentionConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}