module Stratosphere.CleanRooms.AnalysisTemplate.HashProperty (
        HashProperty(..), mkHashProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data HashProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cleanrooms-analysistemplate-hash.html>
    HashProperty {HashProperty -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cleanrooms-analysistemplate-hash.html#cfn-cleanrooms-analysistemplate-hash-sha256>
                  HashProperty -> Maybe (Value Text)
sha256 :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (HashProperty -> HashProperty -> Bool
(HashProperty -> HashProperty -> Bool)
-> (HashProperty -> HashProperty -> Bool) -> Eq HashProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HashProperty -> HashProperty -> Bool
== :: HashProperty -> HashProperty -> Bool
$c/= :: HashProperty -> HashProperty -> Bool
/= :: HashProperty -> HashProperty -> Bool
Prelude.Eq, Int -> HashProperty -> ShowS
[HashProperty] -> ShowS
HashProperty -> String
(Int -> HashProperty -> ShowS)
-> (HashProperty -> String)
-> ([HashProperty] -> ShowS)
-> Show HashProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HashProperty -> ShowS
showsPrec :: Int -> HashProperty -> ShowS
$cshow :: HashProperty -> String
show :: HashProperty -> String
$cshowList :: [HashProperty] -> ShowS
showList :: [HashProperty] -> ShowS
Prelude.Show)
mkHashProperty :: HashProperty
mkHashProperty :: HashProperty
mkHashProperty
  = HashProperty {haddock_workaround_ :: ()
haddock_workaround_ = (), sha256 :: Maybe (Value Text)
sha256 = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties HashProperty where
  toResourceProperties :: HashProperty -> ResourceProperties
toResourceProperties HashProperty {Maybe (Value Text)
()
haddock_workaround_ :: HashProperty -> ()
sha256 :: HashProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sha256 :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CleanRooms::AnalysisTemplate.Hash",
         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 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
"Sha256" (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)
sha256])}
instance JSON.ToJSON HashProperty where
  toJSON :: HashProperty -> Value
toJSON HashProperty {Maybe (Value Text)
()
haddock_workaround_ :: HashProperty -> ()
sha256 :: HashProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sha256 :: Maybe (Value Text)
..}
    = [(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 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
"Sha256" (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)
sha256]))
instance Property "Sha256" HashProperty where
  type PropertyType "Sha256" HashProperty = Value Prelude.Text
  set :: PropertyType "Sha256" HashProperty -> HashProperty -> HashProperty
set PropertyType "Sha256" HashProperty
newValue HashProperty {Maybe (Value Text)
()
haddock_workaround_ :: HashProperty -> ()
sha256 :: HashProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sha256 :: Maybe (Value Text)
..}
    = HashProperty {sha256 :: Maybe (Value Text)
sha256 = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Sha256" HashProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}