module Stratosphere.SecurityHub.Standard (
        module Exports, Standard(..), mkStandard
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SecurityHub.Standard.StandardsControlProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Standard
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-standard.html>
    Standard {Standard -> ()
haddock_workaround_ :: (),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-standard.html#cfn-securityhub-standard-disabledstandardscontrols>
              Standard -> Maybe [StandardsControlProperty]
disabledStandardsControls :: (Prelude.Maybe [StandardsControlProperty]),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-standard.html#cfn-securityhub-standard-standardsarn>
              Standard -> Value Text
standardsArn :: (Value Prelude.Text)}
  deriving stock (Standard -> Standard -> Bool
(Standard -> Standard -> Bool)
-> (Standard -> Standard -> Bool) -> Eq Standard
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Standard -> Standard -> Bool
== :: Standard -> Standard -> Bool
$c/= :: Standard -> Standard -> Bool
/= :: Standard -> Standard -> Bool
Prelude.Eq, Int -> Standard -> ShowS
[Standard] -> ShowS
Standard -> String
(Int -> Standard -> ShowS)
-> (Standard -> String) -> ([Standard] -> ShowS) -> Show Standard
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Standard -> ShowS
showsPrec :: Int -> Standard -> ShowS
$cshow :: Standard -> String
show :: Standard -> String
$cshowList :: [Standard] -> ShowS
showList :: [Standard] -> ShowS
Prelude.Show)
mkStandard :: Value Prelude.Text -> Standard
mkStandard :: Value Text -> Standard
mkStandard Value Text
standardsArn
  = Standard
      {haddock_workaround_ :: ()
haddock_workaround_ = (), standardsArn :: Value Text
standardsArn = Value Text
standardsArn,
       disabledStandardsControls :: Maybe [StandardsControlProperty]
disabledStandardsControls = Maybe [StandardsControlProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Standard where
  toResourceProperties :: Standard -> ResourceProperties
toResourceProperties Standard {Maybe [StandardsControlProperty]
()
Value Text
haddock_workaround_ :: Standard -> ()
disabledStandardsControls :: Standard -> Maybe [StandardsControlProperty]
standardsArn :: Standard -> Value Text
haddock_workaround_ :: ()
disabledStandardsControls :: Maybe [StandardsControlProperty]
standardsArn :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SecurityHub::Standard",
         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
"StandardsArn" 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
standardsArn]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> [StandardsControlProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DisabledStandardsControls"
                                 ([StandardsControlProperty] -> (Key, Value))
-> Maybe [StandardsControlProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StandardsControlProperty]
disabledStandardsControls]))}
instance JSON.ToJSON Standard where
  toJSON :: Standard -> Value
toJSON Standard {Maybe [StandardsControlProperty]
()
Value Text
haddock_workaround_ :: Standard -> ()
disabledStandardsControls :: Standard -> Maybe [StandardsControlProperty]
standardsArn :: Standard -> Value Text
haddock_workaround_ :: ()
disabledStandardsControls :: Maybe [StandardsControlProperty]
standardsArn :: Value Text
..}
    = [(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
"StandardsArn" 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
standardsArn]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> [StandardsControlProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DisabledStandardsControls"
                    ([StandardsControlProperty] -> (Key, Value))
-> Maybe [StandardsControlProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StandardsControlProperty]
disabledStandardsControls])))
instance Property "DisabledStandardsControls" Standard where
  type PropertyType "DisabledStandardsControls" Standard = [StandardsControlProperty]
  set :: PropertyType "DisabledStandardsControls" Standard
-> Standard -> Standard
set PropertyType "DisabledStandardsControls" Standard
newValue Standard {Maybe [StandardsControlProperty]
()
Value Text
haddock_workaround_ :: Standard -> ()
disabledStandardsControls :: Standard -> Maybe [StandardsControlProperty]
standardsArn :: Standard -> Value Text
haddock_workaround_ :: ()
disabledStandardsControls :: Maybe [StandardsControlProperty]
standardsArn :: Value Text
..}
    = Standard {disabledStandardsControls :: Maybe [StandardsControlProperty]
disabledStandardsControls = [StandardsControlProperty] -> Maybe [StandardsControlProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [StandardsControlProperty]
PropertyType "DisabledStandardsControls" Standard
newValue, ()
Value Text
haddock_workaround_ :: ()
standardsArn :: Value Text
haddock_workaround_ :: ()
standardsArn :: Value Text
..}
instance Property "StandardsArn" Standard where
  type PropertyType "StandardsArn" Standard = Value Prelude.Text
  set :: PropertyType "StandardsArn" Standard -> Standard -> Standard
set PropertyType "StandardsArn" Standard
newValue Standard {Maybe [StandardsControlProperty]
()
Value Text
haddock_workaround_ :: Standard -> ()
disabledStandardsControls :: Standard -> Maybe [StandardsControlProperty]
standardsArn :: Standard -> Value Text
haddock_workaround_ :: ()
disabledStandardsControls :: Maybe [StandardsControlProperty]
standardsArn :: Value Text
..} = Standard {standardsArn :: Value Text
standardsArn = PropertyType "StandardsArn" Standard
Value Text
newValue, Maybe [StandardsControlProperty]
()
haddock_workaround_ :: ()
disabledStandardsControls :: Maybe [StandardsControlProperty]
haddock_workaround_ :: ()
disabledStandardsControls :: Maybe [StandardsControlProperty]
..}