module Stratosphere.GuardDuty.MalwareProtectionPlan.S3BucketProperty (
        S3BucketProperty(..), mkS3BucketProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3BucketProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-s3bucket.html>
    S3BucketProperty {S3BucketProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-s3bucket.html#cfn-guardduty-malwareprotectionplan-s3bucket-bucketname>
                      S3BucketProperty -> Maybe (Value Text)
bucketName :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-s3bucket.html#cfn-guardduty-malwareprotectionplan-s3bucket-objectprefixes>
                      S3BucketProperty -> Maybe (ValueList Text)
objectPrefixes :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (S3BucketProperty -> S3BucketProperty -> Bool
(S3BucketProperty -> S3BucketProperty -> Bool)
-> (S3BucketProperty -> S3BucketProperty -> Bool)
-> Eq S3BucketProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3BucketProperty -> S3BucketProperty -> Bool
== :: S3BucketProperty -> S3BucketProperty -> Bool
$c/= :: S3BucketProperty -> S3BucketProperty -> Bool
/= :: S3BucketProperty -> S3BucketProperty -> Bool
Prelude.Eq, Int -> S3BucketProperty -> ShowS
[S3BucketProperty] -> ShowS
S3BucketProperty -> String
(Int -> S3BucketProperty -> ShowS)
-> (S3BucketProperty -> String)
-> ([S3BucketProperty] -> ShowS)
-> Show S3BucketProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3BucketProperty -> ShowS
showsPrec :: Int -> S3BucketProperty -> ShowS
$cshow :: S3BucketProperty -> String
show :: S3BucketProperty -> String
$cshowList :: [S3BucketProperty] -> ShowS
showList :: [S3BucketProperty] -> ShowS
Prelude.Show)
mkS3BucketProperty :: S3BucketProperty
mkS3BucketProperty :: S3BucketProperty
mkS3BucketProperty
  = S3BucketProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), bucketName :: Maybe (Value Text)
bucketName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       objectPrefixes :: Maybe (ValueList Text)
objectPrefixes = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3BucketProperty where
  toResourceProperties :: S3BucketProperty -> ResourceProperties
toResourceProperties S3BucketProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: S3BucketProperty -> ()
bucketName :: S3BucketProperty -> Maybe (Value Text)
objectPrefixes :: S3BucketProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
objectPrefixes :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GuardDuty::MalwareProtectionPlan.S3Bucket",
         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
"BucketName" (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)
bucketName,
                            Key -> ValueList 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
"ObjectPrefixes" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
objectPrefixes])}
instance JSON.ToJSON S3BucketProperty where
  toJSON :: S3BucketProperty -> Value
toJSON S3BucketProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: S3BucketProperty -> ()
bucketName :: S3BucketProperty -> Maybe (Value Text)
objectPrefixes :: S3BucketProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
objectPrefixes :: Maybe (ValueList 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
"BucketName" (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)
bucketName,
               Key -> ValueList 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
"ObjectPrefixes" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
objectPrefixes]))
instance Property "BucketName" S3BucketProperty where
  type PropertyType "BucketName" S3BucketProperty = Value Prelude.Text
  set :: PropertyType "BucketName" S3BucketProperty
-> S3BucketProperty -> S3BucketProperty
set PropertyType "BucketName" S3BucketProperty
newValue S3BucketProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: S3BucketProperty -> ()
bucketName :: S3BucketProperty -> Maybe (Value Text)
objectPrefixes :: S3BucketProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
objectPrefixes :: Maybe (ValueList Text)
..}
    = S3BucketProperty {bucketName :: Maybe (Value Text)
bucketName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BucketName" S3BucketProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
objectPrefixes :: Maybe (ValueList Text)
haddock_workaround_ :: ()
objectPrefixes :: Maybe (ValueList Text)
..}
instance Property "ObjectPrefixes" S3BucketProperty where
  type PropertyType "ObjectPrefixes" S3BucketProperty = ValueList Prelude.Text
  set :: PropertyType "ObjectPrefixes" S3BucketProperty
-> S3BucketProperty -> S3BucketProperty
set PropertyType "ObjectPrefixes" S3BucketProperty
newValue S3BucketProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: S3BucketProperty -> ()
bucketName :: S3BucketProperty -> Maybe (Value Text)
objectPrefixes :: S3BucketProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
objectPrefixes :: Maybe (ValueList Text)
..}
    = S3BucketProperty {objectPrefixes :: Maybe (ValueList Text)
objectPrefixes = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ObjectPrefixes" S3BucketProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketName :: Maybe (Value Text)
..}