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