module Stratosphere.OpenSearchService.Domain.ColdStorageOptionsProperty (
        ColdStorageOptionsProperty(..), mkColdStorageOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ColdStorageOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-coldstorageoptions.html>
    ColdStorageOptionsProperty {ColdStorageOptionsProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-coldstorageoptions.html#cfn-opensearchservice-domain-coldstorageoptions-enabled>
                                ColdStorageOptionsProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (ColdStorageOptionsProperty -> ColdStorageOptionsProperty -> Bool
(ColdStorageOptionsProperty -> ColdStorageOptionsProperty -> Bool)
-> (ColdStorageOptionsProperty
    -> ColdStorageOptionsProperty -> Bool)
-> Eq ColdStorageOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ColdStorageOptionsProperty -> ColdStorageOptionsProperty -> Bool
== :: ColdStorageOptionsProperty -> ColdStorageOptionsProperty -> Bool
$c/= :: ColdStorageOptionsProperty -> ColdStorageOptionsProperty -> Bool
/= :: ColdStorageOptionsProperty -> ColdStorageOptionsProperty -> Bool
Prelude.Eq, Int -> ColdStorageOptionsProperty -> ShowS
[ColdStorageOptionsProperty] -> ShowS
ColdStorageOptionsProperty -> String
(Int -> ColdStorageOptionsProperty -> ShowS)
-> (ColdStorageOptionsProperty -> String)
-> ([ColdStorageOptionsProperty] -> ShowS)
-> Show ColdStorageOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ColdStorageOptionsProperty -> ShowS
showsPrec :: Int -> ColdStorageOptionsProperty -> ShowS
$cshow :: ColdStorageOptionsProperty -> String
show :: ColdStorageOptionsProperty -> String
$cshowList :: [ColdStorageOptionsProperty] -> ShowS
showList :: [ColdStorageOptionsProperty] -> ShowS
Prelude.Show)
mkColdStorageOptionsProperty :: ColdStorageOptionsProperty
mkColdStorageOptionsProperty :: ColdStorageOptionsProperty
mkColdStorageOptionsProperty
  = ColdStorageOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ColdStorageOptionsProperty where
  toResourceProperties :: ColdStorageOptionsProperty -> ResourceProperties
toResourceProperties ColdStorageOptionsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: ColdStorageOptionsProperty -> ()
enabled :: ColdStorageOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpenSearchService::Domain.ColdStorageOptions",
         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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled])}
instance JSON.ToJSON ColdStorageOptionsProperty where
  toJSON :: ColdStorageOptionsProperty -> Value
toJSON ColdStorageOptionsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: ColdStorageOptionsProperty -> ()
enabled :: ColdStorageOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
    = [(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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled]))
instance Property "Enabled" ColdStorageOptionsProperty where
  type PropertyType "Enabled" ColdStorageOptionsProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" ColdStorageOptionsProperty
-> ColdStorageOptionsProperty -> ColdStorageOptionsProperty
set PropertyType "Enabled" ColdStorageOptionsProperty
newValue ColdStorageOptionsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: ColdStorageOptionsProperty -> ()
enabled :: ColdStorageOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
    = ColdStorageOptionsProperty {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" ColdStorageOptionsProperty
Value Bool
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}